-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yml
134 lines (126 loc) · 2.83 KB
/
docker-compose.prod.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
services:
postgres:
container_name: interapp-postgres
image: postgres:16-alpine
restart: always
ports:
- 5432:5432
command: postgres
env_file:
- ./interapp-backend/.env.production
volumes:
- ./interapp-backend/pgdata:/var/lib/postgresql/data
networks:
- interapp-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
start_period: 60s
redis:
container_name: interapp-redis
image: redis:alpine
restart: always
env_file:
- ./interapp-backend/.env.production
ports:
- 6379:6379
networks:
- interapp-network
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 2s
timeout: 2s
retries: 7
scheduler:
container_name: interapp-scheduler
restart: on-failure
build:
context: ./interapp-backend
dockerfile: scheduler/prod.Dockerfile
env_file:
- ./interapp-backend/.env.production
networks:
- interapp-network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./dump:/tmp/dump
- ./minio-dump:/tmp/minio-dump
minio:
container_name: interapp-minio
image: minio/minio
restart: on-failure
command: minio server /data
env_file:
- ./interapp-backend/.env.production
ports:
- 9000:9000
- 9001:9001
volumes:
- ./interapp-backend/minio_data:/data
networks:
- interapp-network
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 2s
timeout: 2s
retries: 5
start_period: 60s
depends_on:
postgres:
condition: service_healthy
backend:
container_name: interapp-backend
restart: always
build:
context: ./interapp-backend
dockerfile: prod.Dockerfile
env_file:
- ./interapp-backend/.env.production
environment:
- APP_VERSION=${APP_VERSION}
ports:
- 8000:8000
networks:
- interapp-network
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
container_name: interapp-frontend
build:
context: ./interapp-frontend
dockerfile: prod.Dockerfile
ports:
- 3000:3000
env_file:
- ./interapp-frontend/.env.production
environment:
- NEXT_PUBLIC_APP_VERSION=${APP_VERSION}
networks:
- interapp-network
depends_on:
- backend
- postgres
nginx:
container_name: interapp-nginx
build:
context: ./nginx
dockerfile: prod.Dockerfile
restart: always
ports:
- 80:80
networks:
- interapp-network
depends_on:
- frontend
networks:
interapp-network:
driver: bridge