-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-staging.yml
76 lines (75 loc) · 2.46 KB
/
docker-compose-staging.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
services:
backend_base:
image: ghcr.io/muchdogesec/obstracts_web_be_obstracts_web_staging:main
command: bash -c "python manage.py migrate && python manage.py collectstatic --noinput"
environment:
- OBSTRACT_SERVICE_BASE_URL=http://obstracts:8001
volumes:
- ./docker-data/backend/static_root:/app/static_root/
depends_on:
obstracts:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
backend:
extends: backend_base
command: bash -c "python manage.py create_swagger_json && gunicorn obstracts_web.wsgi -b 0.0.0.0:8000"
restart: unless-stopped
backend_celery:
extends: backend_base
command: bash -c "cd /app/ && celery -A obstracts_web worker -l info"
backend_beat:
extends: backend_base
command: bash -c "cd /app/ && celery -A obstracts_web beat -l info"
obstracts:
image: ghcr.io/muchdogesec/obstracts_web_staging:main
#command: "bash run.sh"
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8001"
expose:
- "8001:8001"
environment:
- DJANGO_ALLOWED_HOSTS=obstracts
- HISTORY4FEED_URL=http://history4feed:8002/
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://obstracts:8001/api/schema/"]
interval: 30s
timeout: 10s
retries: 5
extra_hosts:
- "host.docker.internal:host-gateway"
obstracts_celery:
extends: obstracts
command: >
bash -c "celery -A obstracts.cjob worker -l INFO"
history4feed:
image: ghcr.io/muchdogesec/history4feed_web_staging:main
command: "bash run.sh"
expose:
- 8002:8002
environment:
- DEBUG=1
- DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] django
- EARLIEST_SEARCH_DATE=2020-01-01T00:00:00Z
extra_hosts:
- "host.docker.internal:host-gateway"
history4feed_celery:
extends: history4feed
command: "celery -A history4feed.h4fscripts worker -l INFO"
frontend:
image: ghcr.io/muchdogesec/obstracts_web_fe_obstracts_web_staging: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"
depends_on:
- backend