-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose-metering.yml
110 lines (102 loc) · 2.76 KB
/
docker-compose-metering.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
version: "3"
services:
rabbitmq_server:
image: rabbitmq:3-management
container_name: rabbitmq
hostname: rabbithost
ports:
- "15672:15672"
- "5672:5672"
volumes:
- ./server/celery_backend/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ./server/celery_backend/definitions.json:/etc/rabbitmq/definitions.json:ro
env_file:
- .env
networks:
- dhruva-network
celery-metering:
container_name: celery-metering
image: server
working_dir: /src
depends_on:
rabbitmq_server:
condition: service_started
volumes:
- ./server:/src
env_file:
- .env
command: sh -c "python3 -m celery -A celery_backend.celery_app worker -Q data-log,heartbeat,upload-feedback-dump,send-usage-email"
networks:
- dhruva-network
celery-monitoring:
container_name: celery-monitoring
image: server
build:
context: ./server
working_dir: /src
depends_on:
rabbitmq_server:
condition: service_started
volumes:
- ./server:/src
env_file:
- .env
command: sh -c "python3 -m celery -A celery_backend.celery_app worker -Q metrics-log"
networks:
- dhruva-network
celery_beat:
container_name: celery_beat
image: server
working_dir: /src
depends_on:
rabbitmq_server:
condition: service_started
celery-metering:
condition: service_started
volumes:
- ./server:/src
env_file:
- .env
command: sh -c "python3 -m celery -A celery_backend.celery_app beat --loglevel DEBUG"
networks:
- dhruva-network
timescaledb:
container_name: timescaledb
image: "timescale/timescaledb-ha:pg15-latest"
ports:
- "5432:5432"
volumes:
- timescaledb:/home/postgres/pgdata/data
environment:
- POSTGRES_PASSWORD=$TIMESCALE_PASSWORD
- POSTGRES_DB=$TIMESCALE_DATABASE_NAME
- POSTGRES_USER=$TIMESCALE_USER
env_file:
- .env
networks:
- dhruva-network
# Use Flower later for monitoring
# celery-flower:
# container_name: celery-flower
# image: server_image
# working_dir: /src
# environment:
# - AMQP_USERNAME=user
# - AMQP_PASSWORD=user
# - AMQP_ADMIN_USERNAME=admin
# - AMQP_ADMIN_PASSWORD=admin
# - AMQP_HOST=dhruva_host
# - AMQP_PORT=5672
# - AMQP_ADMIN_HOST=dhruva_host
# - AMQP_ADMIN_PORT=15672
# - FLOWER_BASIC_AUTH=user:user
# volumes:
# - ./server:/src
# ports:
# - "5555:5555"
# command: sh -c "python3 -m celery -A celery_backend.celery_app flower --port=5555 --basic_auth=admin:admin --broker_api=http://admin:admin@rabbithost:15672/api/ --address=0.0.0.0"
volumes:
timescaledb: {}
networks:
dhruva-network:
name: dhruva-network