-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
58 lines (54 loc) · 1.3 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
version: '3'
services:
redis:
hostname: redis
container_name: redis_db
restart: unless-stopped
image: redis
expose:
- "6379"
volumes:
- ./data:/data
networks:
- offertiamo_development
web:
container_name: webserver_flask
restart: unless-stopped
build: .
volumes:
- .:/code
ports:
- "5000:5000"
expose:
- "5000"
environment:
TZ: "Europe/Rome"
CELERY_BROKER_URL: "redis://redis:6379/1"
CELERY_RESULT_BACKEND: "redis://redis:6379/1"
REDIS_DATABASE_HOST: "redis"
command: [ "gunicorn", "--bind", "0.0.0.0:5000", "--workers", "3", "main:flask_app" ]
depends_on:
- redis
- worker
networks:
- offertiamo_development
worker:
container_name: worker_celery
restart: unless-stopped
build: .
volumes:
- .:/code
environment:
TZ: "Europe/Rome"
CELERY_BROKER_URL: "redis://redis:6379/1"
CELERY_RESULT_BACKEND: "redis://redis:6379/1"
BROKER_URL: "redis://redis:6379/1"
RESULT_BACKEND: "redis://redis:6379/1"
REDIS_DATABASE_HOST: redis
command: [ "celery", "-A", "services.celery_services.celery_app", "worker" ]
depends_on:
- redis
networks:
- offertiamo_development
networks:
offertiamo_development: