-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
executable file
·84 lines (84 loc) · 2.68 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3'
services:
web-server:
container_name: web-server
build: ./app
ports:
- "8000:8000"
command: gunicorn --workers=3 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000 main:app
volumes:
- ./app:/usr/src/app
environment:
CELERY_BROKER_URL: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
INFLUXDB_V2_URL: "${INFLUXDB_V2_URL}"
INFLUXDB_V2_ORG: "${INFLUXDB_V2_ORG}"
INFLUXDB_V2_TOKEN: "${INFLUXDB_V2_TOKEN}"
DATABASE_HOST: "${DATABASE_HOST}"
DATABASE_NAME: "${DATABASE_NAME}"
DATABASE_USERNAME: "${DATABASE_USERNAME}"
DATABASE_PASSWORD: "${DATABASE_PASSWORD}"
DATABASE_PORT: "${DATABASE_PORT}"
PLUME_EMAIL: "${PLUME_EMAIL}"
PLUME_PASSWORD: "${PLUME_PASSWORD}"
links:
- redis
# celery worker process
celery-worker:
container_name: celery-worker
build: ./app
command: celery -A tasks worker --loglevel=INFO
volumes:
- ./app:/usr/src/app
environment:
CELERY_BROKER_URL: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
ZEPHYR_USERNAME: "${ZEPHYR_USERNAME}"
ZEPHYR_PASSWORD: "${ZEPHYR_PASSWORD}"
SC_USERNAME: "${SC_USERNAME}"
SC_PASSWORD: "${SC_PASSWORD}"
PLUME_EMAIL: "${PLUME_EMAIL}"
PLUME_PASSWORD: "${PLUME_PASSWORD}"
INFLUXDB_V2_URL: "${INFLUXDB_V2_URL}"
INFLUXDB_V2_ORG: "${INFLUXDB_V2_ORG}"
INFLUXDB_V2_TOKEN: "${INFLUXDB_V2_TOKEN}"
links:
- web-server
- redis
# celery beat process separate to workers
celery-beat:
container_name: celery-beat
build: ./app
command: celery -A tasks beat --loglevel=INFO
volumes:
- ./app:/app
environment:
CELERY_BROKER_URL: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
ZEPHYR_USERNAME: "${ZEPHYR_USERNAME}"
ZEPHYR_PASSWORD: "${ZEPHYR_PASSWORD}"
SC_USERNAME: "${SC_USERNAME}"
SC_PASSWORD: "${SC_PASSWORD}"
PLUME_EMAIL: "${PLUME_EMAIL}"
PLUME_PASSWORD: "${PLUME_PASSWORD}"
INFLUXDB_V2_URL: "${INFLUXDB_V2_URL}"
INFLUXDB_V2_ORG: "${INFLUXDB_V2_ORG}"
INFLUXDB_V2_TOKEN: "${INFLUXDB_V2_TOKEN}"
links:
- web-server
- redis
# celery flower to monitor celery tasks, username = FLOWER_USERNAME, password = FLOWER_PASSWORD
flower:
image: mher/flower
command: [ "celery", "flower", "--basic_auth=${FLOWER_USERNAME}:${FLOWER_PASSWORD}" ]
environment:
CELERY_BROKER_URL: "redis://redis:6379/0"
FLOWER_PORT: "8888"
FLOWER_HOST: "0.0.0.0"
ports:
- "8888:8888"
redis:
container_name: redis
image: redis:6-alpine
ports:
- "6379:6379"