forked from mk48/fullstack-crud-react-node-postgresql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (44 loc) · 914 Bytes
/
docker-compose.yml
File metadata and controls
48 lines (44 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: "3.9"
services:
postgres:
image: postgres:14
container_name: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: crud_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
backend:
build: ./server
container_name: backend
restart: always
ports:
- "5000:5000"
depends_on:
- postgres
environment:
DB_HOST: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_NAME: crud_db
volumes:
- ./server:/usr/src/app
frontend:
build: ./webclient
container_name: frontend
restart: always
ports:
- "3000:3000"
depends_on:
- backend
environment:
- NODE_OPTIONS=--openssl-legacy-provider
volumes:
- ./webclient:/app
- /app/node_modules
volumes:
postgres_data: