-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.11 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
version: '3.5'
services:
web:
depends_on:
- postgres
- redis
image: pp/python-venv
ports:
- "8000:8000"
volumes:
- .:/code
- ./docker/venv:/opt/venv
env_file:
- ./dev.env
- ./dev-local.env
command: python manage.py runserver 0.0.0.0:8000
worker:
depends_on:
- postgres
- redis
image: pp/python-venv
volumes:
- .:/code
- ./docker/venv:/opt/venv
env_file:
- ./dev.env
- ./dev-local.env
command: celery worker --app=worker.celery_app --loglevel=info --concurrency=2
worker_beat:
depends_on:
- redis
image: pp/python-venv
volumes:
- .:/code
- ./docker/venv:/opt/venv
env_file:
- ./dev.env
command: >
celery beat --app=worker.celery_app --loglevel=info
--schedule=/home/user/celerybeat.db --pidfile=/home/user/celerybeat.pid
redis:
image: "redis:alpine"
volumes:
- ./docker/data/redis:/data
postgres:
image: "postgres:10-alpine"
volumes:
- ./docker/data/postgres:/var/lib/postgresql/data
env_file:
- ./dev.env