-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yaml
74 lines (70 loc) · 1.67 KB
/
docker-compose.dev.yaml
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
69
70
71
72
73
74
name: "health-checker-dev"
services:
backend:
container_name: backend
build: ./back
command: sh -c "npm run migration:up && npm run dev"
env_file: .env
volumes:
- ./back/src:/app/src
restart: always
ports:
- 4000:4000
depends_on:
database:
condition: service_healthy
healthcheck:
test: 'curl --fail --request POST --header ''content-type: application/json'' --url ''http://localhost:4000/'' --data ''{"query":"query { __typename }"}'' || exit 1'
interval: 5s
timeout: 5s
retries: 20
frontend:
container_name: frontend
build: ./front
command: sh -c "npm run codegen && npm run dev"
env_file: .env
volumes:
- ./front/src/:/app/src/
restart: always
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:5173' || exit 1"
interval: 1s
timeout: 2s
retries: 100
depends_on:
backend:
condition: service_healthy
database:
container_name: database
image: postgres
env_file: .env
restart: always
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 20
volumes:
- ./data/database:/var/lib/postgresql/data
adminer:
container_name: adminer
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
database:
condition: service_healthy
gateway:
container_name: gateway
image: nginx
ports:
- 8000:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
restart: always
depends_on:
- backend
- frontend