-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.dev.yml
68 lines (66 loc) · 1.39 KB
/
docker-compose.dev.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
62
63
64
65
66
67
68
version: "3.4"
services:
db:
restart: always
image: postgres
ports:
- 5432:5432
volumes:
- ./tmp/db:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_DB: cheeri_no
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
secrets:
- postgres_password
server:
image: server
restart: on-failure
build:
context: ./server
dockerfile: Dockerfile.dev
ports:
- 3000:3000
environment:
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_USER: postgres
POSTGRES_DB: cheeri_no
POSTGRES_HOST: db
volumes:
- ./server:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/dist
links:
- db
depends_on:
db:
condition: service_healthy
secrets:
- postgres_password
client:
image: client
restart: on-failure
build:
context: ./client
dockerfile: Dockerfile.dev
environment:
API_HOST: server
API_PORT: 3000
ports:
- 3001:3000
- 15319:15319
links:
- server
depends_on:
- server
volumes:
- ./client:/usr/src/app
- /usr/src/app/node_modules
secrets:
postgres_password:
file: ./docker_postgres_password.txt