-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.production.yml
104 lines (95 loc) · 2.21 KB
/
docker-compose.production.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
version: '3'
volumes:
pg_data:
redis_data:
redis_conf:
static:
media:
logs:
services:
db:
image: postgres:16.2
env_file: .env
restart: always
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 3s
retries: 3
start_period: 3s
redis:
image: redis:alpine
env_file: .env
restart: always
volumes:
- redis_data:/root/redis
- redis_conf:/usr/local/etc/redis/redis.conf
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
backend:
image: blakkheart/diary_backend
env_file: .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command:
["gunicorn", "--bind", "0.0.0.0:8000", "config.wsgi"]
volumes:
- media:/app/media
- static:/backend_static
- logs:/logs
celery-worker:
image: blakkheart/diary_backend
env_file: .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: celery -A config worker -l info
volumes:
- media:/app/media
- static:/backend_static
- logs:/logs
minio:
image: minio/minio:latest
hostname: running.myddns.me
environment:
- MINIO_SERVER_URL=https://running.myddns.me:9000
volumes:
- ./minio:/minio_files
- /home/tssdr/diary-training/minio/certs/:/opt/minio/certs
env_file: .env
command: 'minio server --certs-dir /opt/minio/certs /minio_files --console-address ":9001"'
ports:
- 9000:9000
- 9001:9001
createbuckets:
image: minio/mc
depends_on:
- minio
env_file: .env
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add --quiet --api s3v4 s3 https://running.myddns.me:9000 minioadmin minioadmin;
/usr/bin/mc mb --quiet s3/running-app;
/usr/bin/mc anonymous set public s3/running-app;
"
nginx:
image: blakkheart/diary_gateway
depends_on:
- backend
- minio
- celery-worker
ports:
- 8000:80
volumes:
- static:/static
- media:/media