-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-production.yml
59 lines (58 loc) · 1.93 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
services:
ctibutler_base:
image: ghcr.io/muchdogesec/ctibutler_web_production:main
command: bash -c "python manage.py migrate && python -m ctibutler.worker.populate_dbs"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- DJANGO_ALLOWED_HOSTS=ctibutler
ctibutler:
extends: ctibutler_base
command: bash -c "gunicorn ctibutler.wsgi:application --reload --bind 0.0.0.0:8006"
healthcheck:
test: ["CMD", "python", "-c", "import requests; print(requests.get('''http://ctibutler:8006/api/schema/''').text)"]
interval: 30s
timeout: 10s
retries: 5
expose:
- 8006:8006
ctibutler_celery:
extends: ctibutler_base
command: bash -c "celery -A ctibutler.worker worker -l INFO"
backend_base:
image: ghcr.io/muchdogesec/ctibutler_web_be_ctibutler_web_production:main
command: bash -c "python manage.py migrate && python manage.py collectstatic --noinput"
environment:
- CTIBUTLER_SERVICE_BASE_URL=http://ctibutler:8006
volumes:
- ./docker-data/backend/static_root:/app/static_root/
extra_hosts:
- "host.docker.internal:host-gateway"
backend:
extends: backend_base
command: bash -c "python manage.py create_swagger_json && gunicorn project.wsgi -b 0.0.0.0:8000"
restart: unless-stopped
depends_on:
ctibutler:
condition: service_healthy
frontend:
image: ghcr.io/muchdogesec/ctibutler_web_fe_ctibutler_web_production:main
command: "cp -rf build/ deploy"
volumes:
- ./docker-data/frontend:/app/deploy
nginx:
image: nginx:1.27
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker-data/frontend/build:/usr/share/nginx/html
- ./docker-data/backend/static_root:/usr/share/nginx/backend_static/dj-static
ports:
- "8080:80"
- "8001:8000"
- "8002:8002"
- "8003:8003"
depends_on:
- backend
volumes:
postgres_data:
redis_data: