-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (61 loc) · 1.66 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
version: "3.7"
services:
web:
build:
context: ./
dockerfile: Dockerfile
command: ./docker-entrypoint.sh -- python manage.py runserver 0.0.0.0:8000
volumes:
- .:/usr/src/app/
ports:
- 8000:8000
environment:
- SECRET_KEY=${SECRET_KEY}
- DJANGO_SETTINGS_MODULE=django_template.settings.dev
depends_on:
- db
db:
image: postgres:14-alpine
volumes:
- django_template_db:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${DB_DEV_USER}
- POSTGRES_PASSWORD=${DB_DEV_PASSWORD}
- POSTGRES_DB=${DB_DEV_NAME}
ports:
- 5432:5432
redis:
image: redis:7.2.3-alpine
volumes:
- ./tmp/redis/data:/data
ports:
- 6379:6379
worker:
build: ./
entrypoint: celery
command: -A django_template worker --beat --scheduler django -l info -E
volumes:
- .:/app
environment:
- BROKER_URL=${BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
- CELERY_CACHE_BACKEND=${CELERY_CACHE_BACKEND}
depends_on:
- db
- redis
flower:
build: ./
command: celery -A django_template flower
volumes:
- .:/data
working_dir: /data
ports:
- 5555:5555
environment:
- BROKER_URL=${BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
depends_on:
- worker
- redis
volumes:
django_template_db: