-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (67 loc) · 1.98 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
services:
db:
image: postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d postgres -U postgres']
interval: 1s
timeout: 10s
retries: 50
adminer:
image: adminer
depends_on:
db:
condition: service_healthy
backend:
build: ./backend
volumes:
- ./backend/src:/app/src
healthcheck:
test: 'curl --fail --request POST --header ''content-type: application/json'' --url ''http://localhost:4000'' --data ''{"query":"query { __typename }"}'' || exit 1'
interval: 1s
timeout: 10s
retries: 100
env_file:
- ./backend/.env
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
volumes:
- ./frontend/src:/app/src
depends_on:
backend:
condition: service_healthy
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:5173' || exit 1"
interval: 1s
timeout: 10s
retries: 100
storage-api:
build: ./storage-api
volumes:
- ./storage-api/src:/app/src
- ./storage-api/uploads:/app/uploads
healthcheck:
test: "curl --fail --request GET --max-time 5 --url 'http://localhost:3000' || exit 1"
interval: 5s
timeout: 20s
retries: 50
ports:
- 3000:3000
api_gateway:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./storage-api/uploads:/app/uploads
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
ports:
- 7007:80