-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (56 loc) · 1.17 KB
/
docker-compose.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
version: '3.8'
services:
frontend-react:
build:
context: .
ports:
- "3000:3000"
depends_on:
- backend-nodejs
environment:
- REACT_APP_BACKEND_URL=http://localhost:5000
networks:
- app-network
restart: always
volumes:
- .:/app
backend-nodejs:
build:
context: ./be
ports:
- "5000:5000"
environment:
- NODE_ENV=development
- DB_HOST=database-pg
- BE_PORT=5000
- FE_PORT=3000
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
depends_on:
- database-pg
networks:
- app-network
volumes:
- ./be:/usr/src/app
- /usr/src/app/node_modules
# command: sh -c "npm install && npm run dev" # command override --- keep commented
database-pg:
image: postgres:latest
ports:
- "5433:5432"
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- app-network
restart: always
volumes:
pgdata:
driver: local
networks:
app-network:
driver: bridge