-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (47 loc) · 1.22 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
services:
postgres-db:
image: postgres
container_name: ${POSTGRES_HOST}
env_file: .env
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
volumes:
- krs-database-vol:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
start_period: 0s
interval: 5s
timeout: 5s
retries: 5
server:
container_name: ${SERVER_HOST}
build:
context: ./
dockerfile: ./server/Dockerfile
ports:
- ${SERVER_PORT}:${SERVER_PORT}
env_file: .env
volumes:
- ./server:/server
- krs-server-node-modules-vol:/server/node_modules
depends_on:
postgres-db:
condition: service_healthy
client:
container_name: ${CLIENT_HOST}
build:
context: ./
dockerfile: ./client/Dockerfile
ports:
- ${CLIENT_PORT}:${CLIENT_PORT}
env_file: .env
volumes:
- ./client:/client
- krs-client-node-modules-vol:/client/node_modules
volumes:
krs-server-node-modules-vol:
name: "krs-server-node-modules-vol"
krs-database-vol:
name: "krs-database-vol"
krs-client-node-modules-vol:
name: "krs-client-node-modules-vol"