-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
54 lines (51 loc) · 1.31 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
version: '3'
services:
#-----------------------------------------------
# Web Service
#-----------------------------------------------
flask:
build: .
command: /usr/local/bin/gunicorn app:flask_app -w 2 -b :8000 -b :80 --reload
env_file: .env
volumes:
- .:/app
ports:
- 8000:8000
- 80:80
stdin_open: true
tty: true
logging:
options:
max-size: "500k"
max-file: "10"
#-----------------------------------------------
# Redis
#-----------------------------------------------
redis:
image: redis
ports:
- 6379:6379
logging:
options:
max-size: "500k"
max-file: "10"
#-----------------------------------------------
# Celery Service
#-----------------------------------------------
worker:
# ignores changes in repos/ so that on git clone we don't relaunch the worker a thousand times
command: bash -c "watchmedo auto-restart -p '*.py' -i '**/repos/**/**' --recursive -- celery -A app:celery_app worker"
working_dir: /app
build:
context: .
dockerfile: Dockerfile.worker
depends_on:
- redis
env_file: .env
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock
logging:
options:
max-size: "500k"
max-file: "10"