-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
68 lines (63 loc) · 1.88 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
68 lines (63 loc) · 1.88 KB
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
services:
db:
image: postgres:17
environment:
- POSTGRES_DB=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASS}
expose:
- "${DB_PORT:-5432}"
volumes:
- ./data/pgdb:/var/lib/postgresql/data
redis:
image: redis:8
expose:
- "${REDIS_PORT:-6379}"
volumes:
- ./data/redis:/data
backend:
image: ${BACKEND_IMAGE}
env_file: ".env"
depends_on:
- db
- redis
expose:
- 8000
volumes:
- "./data/media_storage:${LOCAL_MEDIA_ROOT}"
command: >
bash -c "uvicorn bookings_study.main:app --host 0.0.0.0 --port 8000"
celery_worker:
image: ${BACKEND_IMAGE}
env_file: ".env"
depends_on:
- backend
- redis
volumes:
- "./data/media_storage:${LOCAL_MEDIA_ROOT}"
command: "celery --app=bookings_study.background_tasks.celery.app:celery_app worker -l INFO"
celery_beat:
image: ${BACKEND_IMAGE}
env_file: ".env"
depends_on:
- backend
- redis
volumes:
- "./data/media_storage:${LOCAL_MEDIA_ROOT}"
command: "celery --app=bookings_study.background_tasks.celery.app:celery_app beat -l INFO"
nginx:
image: nginx:1.28-alpine
environment:
- "LOCAL_MEDIA_ROOT=${LOCAL_MEDIA_ROOT}"
depends_on:
- backend
- celery_worker
- celery_beat
ports:
- "80:80"
- "443:443"
volumes:
- "./data/media_storage:${LOCAL_MEDIA_ROOT}"
- ./nginx/templates/app.conf.template:/etc/nginx/templates/app.conf.template:ro
- ./frontend:/app/static:ro
- ./ssl:/etc/nginx/ssl:ro