-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
83 lines (83 loc) · 2.02 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
services:
backend:
build: ./backend
container_name: backend
volumes:
- ./backend/src:/app/src
- ./backend/migrations:/app/migrations
env_file:
- .env
healthcheck:
test: 'curl --fail --request POST --header ''content-type: application/json'' --url ''http://localhost:4000/graphql'' --data ''{"query":"query { __typename }"}'' || exit 1'
interval: 1s
timeout: 2s
retries: 100
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
volumes:
- ./frontend/src:/app/src
depends_on:
backend:
condition: service_healthy
env_file:
- .env
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:5173' || exit 1"
interval: 1s
timeout: 2s
retries: 100
db:
image: postgres:16
build: ./db
container_name: db
healthcheck:
test: ["CMD-SHELL", "pg_isready -d postgres -U postgres"]
interval: 1s
timeout: 2s
retries: 100
environment:
POSTGRES_PASSWORD: postgres
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgres-data/data:/var/lib/postgresql/data
- ./db/dumps:/dumps
env_file:
- .env
adminer:
image: adminer
ports:
- 8080:8080
files:
build: ./files
healthcheck:
test: "curl --fail --request GET --url 'http://localhost:3000' || exit 1"
interval: 1s
timeout: 2s
env_file:
- .env
volumes:
- ./files/src:/app/src
apigateway:
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
files:
condition: service_healthy
ports:
- "7002:80"
redis:
image: redis
redis-commander:
image: rediscommander/redis-commander
environment:
- REDIS_HOSTS=redis
ports:
- "8081:8081"