-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
59 lines (54 loc) · 1.08 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
version: '3.9'
services:
api:
build:
context: ./server
dockerfile: Dockerfile
container_name: api
restart: on-failure
depends_on:
postgres:
condition: service_healthy
ports:
- 5000:5000
env_file:
- ./server/.env
volumes:
- /usr/src/server/node_modules
- ./server:/usr/src/server
links:
- postgres
postgres:
image: postgres:14.5-alpine
container_name: postgres
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
ports:
- 5433:5432
env_file:
- ./server/.env
volumes:
- postgres_data:/var/lib/postgresql/data
web:
build:
context: ./client
dockerfile: Dockerfile
target: builder
container_name: web
restart: on-failure
depends_on:
- api
command: ["npm", "run", "dev"]
ports:
- 3000:3000
env_file:
- ./client/.env
volumes:
- /usr/src/app/node_modules
- ./client:/usr/src/app
volumes:
postgres_data: