This repository has been archived by the owner on Aug 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
159 lines (152 loc) · 4.22 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
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: '3'
services:
rabbit:
container_name: masu_rabbit
hostname: rabbit
image: rabbitmq:latest
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest
ports:
- "${RABBITMQ_PORT-5673}:5672"
masu-server:
container_name: masu_server
build:
context: .
dockerfile: Dockerfile
working_dir: /masu
entrypoint: 'flask run --host 0.0.0.0'
environment:
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- RABBITMQ_HOST=rabbit
- RABBITMQ_PORT=5672
- MASU_SECRET_KEY=abc
- OPENSHIFT_BUILD_COMMIT=blah
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- FLASK_APP=masu
- FLASK_ENV=development
- prometheus_multiproc_dir=/tmp
- MASU_DATE_OVERRIDE
- MASU_RETAIN_NUM_MONTHS
- MASU_DEBUG
- LOG_LEVEL=INFO
privileged: true
ports:
- "5000:5000"
volumes:
- '.:/masu/'
links:
- rabbit
masu-worker:
container_name: masu_worker
build:
context: .
dockerfile: Dockerfile
working_dir: /masu
entrypoint: ['celery', '-A', 'masu.celery.worker', 'worker', '-E', '-l', 'info', '-Q', 'celery,download,remove_expired,reporting,process']
environment:
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- RABBITMQ_HOST=rabbit
- RABBITMQ_PORT=5672
- MASU_SECRET_KEY=abc
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- prometheus_multiproc_dir=/tmp
- MASU_DATE_OVERRIDE
- MASU_RETAIN_NUM_MONTHS
- MASU_DEBUG
- LOG_LEVEL=INFO
privileged: true
ports:
- "9999:9999"
volumes:
- '.:/masu/'
# - '~/aws_local:/tmp/local_bucket'
# - '~/insights_local:/var/tmp/insights_local'
links:
- rabbit
depends_on:
- rabbit
masu-listener:
container_name: masu_listener
build:
context: .
dockerfile: Dockerfile
working_dir: /masu
entrypoint: ['python', 'masu/listener/run.py']
environment:
- DATABASE_ENGINE=postgresql
- DATABASE_NAME=${DATABASE_NAME-postgres}
- DATABASE_HOST=db
- DATABASE_PORT=5432
- RABBITMQ_HOST=rabbit
- RABBITMQ_PORT=5672
- DATABASE_USER=${DATABASE_USER-postgres}
- DATABASE_PASSWORD=${DATABASE_PASSWORD-postgres}
- MASU_SECRET_KEY=abc
- INSIGHTS_KAFKA_HOST=kafka
- INSIGHTS_KAFKA_PORT=29092
- KAFKA_CONNECT=True
- prometheus_multiproc_dir=/tmp
- MASU_DATE_OVERRIDE
- MASU_DEBUG
- LOG_LEVEL=INFO
- INITIAL_INGEST_NUM_MONTHS=1
- PYTHONPATH=.
privileged: true
ports:
- "9988:9999"
volumes:
- '.:/masu/'
links:
- rabbit
depends_on:
- rabbit
prometheus:
container_name: masu_prometheus
hostname: prometheus
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- './docker_resources/prometheus/:/etc/prometheus/'
grafana:
container_name: masu_grafana
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- './docker_resources/grafana/provisioning/:/etc/grafana/provisioning/'
depends_on:
- prometheus
monitor:
container_name: masu_monitor
build:
context: .
dockerfile: Dockerfile
working_dir: /masu
entrypoint: ['celery-prometheus-exporter', '--enable-events', '--broker=amqp://rabbit:5672//', '--verbose']
privileged: true
ports:
- "8888:8888"
volumes:
- '.:/masu/'
links:
- rabbit
depends_on:
- rabbit
networks:
default:
external:
name: koku-network