forked from chingu-voyages/moonshot-chingu-quiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (42 loc) · 904 Bytes
/
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
version: "3.8"
services:
client:
image: node:14
restart: always
user: node
working_dir: /home/node/app
volumes:
- ./client:/home/node/app
ports:
- "3000:3000"
command: bash -c "npm i && npm run dev"
api:
image: node:14
restart: always
user: node
working_dir: /home/node/app
volumes:
- ./server:/home/node/app
ports:
- "5000:5000"
command: bash -c "npm i && npm run dev"
environment:
PGUSER: docker
PGHOST: db
PGDATABASE: docker
PGPASSWORD: docker
PGPORT: 5432
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: docker
POSTGRES_USER: docker
POSTGRES_DB: docker
volumes:
- "quizdata:/var/lib/postgresql/data"
- "./quiz_db.sql:/docker-entrypoint-initdb.d/quiz_db.sql"
ports:
- "5432:5432"
volumes:
quizdata: