-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocal.yml
52 lines (50 loc) · 1.12 KB
/
local.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
version: "3"
volumes:
db_data:
services:
django: &django
build:
context: .
dockerfile: Dockerfile.local
ports:
- 8000:8000
depends_on:
- db
- redis-db
links:
- db
environment:
- DATABASE_URL=postgres://test:secret@db:5432/testdb
- REDIS_URL=redis://redis-db:6379/0
- DJANGO_SETTINGS_MODULE=config.settings.local
env_file:
- .env.local
volumes:
- .:/app
command: python app/manage.py runserver 0.0.0.0:8000
db:
image: "postgres:12.3"
expose:
- 5432
environment:
- POSTGRES_USER=test
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=testdb
volumes:
- db_data:/var/lib/postgresql/data
redis-db:
image: redis:6.0.6
celery-worker:
<<: *django
depends_on:
- db
- redis-db
ports: []
command: celery -A config.celery_app worker --workdir app -l INFO
celery-beat:
<<: *django
depends_on:
- db
- redis-db
ports: []
command: celery -A config.celery_app beat --workdir app -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler