-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
77 lines (71 loc) · 2.18 KB
/
docker-compose.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
version: '3.3'
services:
mysql-db:
container_name: mysql-db
image: mysql:latest # After 8.0.26
ports:
- '3306:3306'
env_file: .env
volumes:
- ./db:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 20s
retries: 10
web:
container_name: web
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ".:/codal"
- "./modules/requests_html.py:/usr/local/lib/python3.9/site-packages/requests_html.py"
ports:
- "80:8000"
depends_on:
mysql-db:
condition: service_healthy
celery:
condition: service_started
celery-beat:
condition: service_started
redis:
container_name: redis
image: bitnami/redis:latest # After 6.0.15
environment:
- ALLOW_EMPTY_PASSWORD=yes
celery:
container_name: celery
build: .
command: celery -A codal worker -l info -P solo --logfile=celery.log # Command used to start the Celery worker in the Docker container
volumes:
- ".:/codal"
- "./modules/requests_html.py:/usr/local/lib/python3.9/site-packages/requests_html.py"
environment:
- DEBUG=1
- SECRET_KEY=dbaa1_i7%*3r9-=z-+_mz4r-!qeed@(-a_r(g@k8jo8y3r27%m
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
# depends on show that celery worker service requires the web service and the redis service to run
depends_on:
redis:
condition: service_started
mysql-db:
condition: service_healthy
celery-beat:
container_name: celery-beat
build: .
command: celery -A codal beat -l info
volumes:
- ".:/codal"
- "./modules/requests_html.py:/usr/local/lib/python3.9/site-packages/requests_html.py"
environment:
- DEBUG=1
- SECRET_KEY=dbaa1_i7%*3r9-=z-+_mz4r-!qeed@(-a_r(g@k8jo8y3r27%m
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
# depends on show that celery worker service requires the web service and the redis service to run
depends_on:
mysql-db:
condition: service_healthy
celery:
condition: service_started