-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
59 lines (54 loc) · 1.18 KB
/
docker-compose.yml
File metadata and controls
59 lines (54 loc) · 1.18 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
version: "3"
x-logging:
&default-logging
logging:
driver: json-file
options:
max-size: 100m
services:
app: &app
build:
context: .
ports:
- 8000:8000
volumes:
- ./app:/app
command: >
sh -c " python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
env_file:
- .env
<<: *default-logging
# db:
# image: postgres:alpine
# environment:
# - POSTGRES_DB=app
# - POSTGRES_USER=postgres
# - POSTGRES_PASSWORD=postgres
# <<: *default-logging
redis:
image: redis:alpine
command: [
"sh", "-c",
'docker-entrypoint.sh --appendonly yes --requirepass "$$REDIS_PASSWORD"'
]
env_file: .env.sample
<<: *default-logging
restart: always
# Distributed Task Queue Worker
celery:
<<: *app
command: sh -c "celery -A app worker --loglevel=info"
ports: [ ]
depends_on:
- redis
<<: *default-logging
# Celery Beat
celery-beat:
<<: *app
command: sh -c "celery -A app beat --loglevel=info"
ports: [ ]
depends_on:
- redis
<<: *default-logging