-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
70 lines (65 loc) · 1.44 KB
/
docker-compose.prod.yml
File metadata and controls
70 lines (65 loc) · 1.44 KB
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
services:
web:
build: .
command: gunicorn interview_service.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/app/staticfiles
env_file:
- .env
depends_on:
db:
condition: service_healthy
minio:
condition: service_healthy
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
volumes:
- minio_data:/data
env_file:
- .env
ports:
- "${MINIO_PORT:-8000}:9000"
command: server /data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
createbucket:
image: minio/mc:latest
restart: "no"
depends_on:
minio:
condition: service_healthy
env_file:
- .env
entrypoint: >
/bin/sh -c "
mc alias set myminio http://minio:9000 $${MINIO_ACCESS_KEY} $${MINIO_SECRET_KEY};
mc mb myminio/$${MINIO_BUCKET_NAME} --ignore-existing;
exit 0;
"
nginx:
image: nginx:alpine
ports:
- "${PORT:-8000}:80"
volumes:
- static_volume:/app/staticfiles:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- web
volumes:
postgres_data:
minio_data:
static_volume: