-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
75 lines (67 loc) · 1.61 KB
/
docker-compose.yaml
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
name: fcurrency
volumes:
static_volume:
services:
redis:
image: redis:alpine3.18
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: .
dockerfile: ./Dockerfile
env_file: .env
environment:
- REDIS_URI=redis://redis:6379/0
volumes:
- static_volume:/static
command:
- /bin/sh
- -c
- |
python manage.py collectstatic --noinput
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
depends_on:
redis:
condition: service_healthy
celery:
build:
context: .
dockerfile: ./Dockerfile
env_file: .env
environment:
- REDIS_URI=redis://redis:6379/0
volumes:
- .data/logs:/backend/data/logs
command: celery -A config.celery worker -l warning -E --logfile=./data/logs/celery-worker.log
depends_on:
backend:
condition: service_started
celery-beat:
build:
context: .
dockerfile: ./Dockerfile
env_file: .env
environment:
- REDIS_URI=redis://redis:6379/0
volumes:
- .data/logs:/backend/data/logs
command: celery -A config beat -l warning --logfile=./data/logs/celery-beat.log
depends_on:
backend:
condition: service_started
nginx:
image: nginx:1.25.2-alpine3.18-slim
ports:
- "80:80"
volumes:
- ./nginx_loc.conf:/etc/nginx/conf.d/default.conf
- static_volume:/staticfiles/static/
depends_on:
backend:
condition: service_started