-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
174 lines (163 loc) · 4.07 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
version: '3'
services:
nginx:
build:
context: .
dockerfile: ./devops/docker/Nginx.Dockerfile
links:
- web:web
- netdata:netdata
volumes:
- ./:/usr/src/app
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
depends_on:
- web
- netdata
ports:
- 80:80
- 9197:19999
web:
build:
context: .
dockerfile: ./devops/docker/Dockerfile
depends_on:
- rabbitmq
- db
command: bash -c "./devops/scripts/wait-for-it.sh -t 120 db:5432 && ./devops/scripts/app_server.sh env=development"
environment:
- ENVIRONMENT=development
- DJANGO_SETTINGS_MODULE=configuration.settings
- SERVICE=messaging-service
- DB_USER=messaging-service
- DB_PASS=P@55w0rd
- DB_NAME=messaging-service
- DB_HOST=db
- DB_PORT=5432
- HTTPBIN_URL=http://httpbin:8000
- BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- GCLOUD_PROJECT=pycon-monitoring-workshop
volumes:
- ./:/usr/src/app
- /app/static
- /var/log
- /var/log/nginx
ports:
- 80
- 9191:19999
links:
- rabbitmq:rabbitmq
- db:db
- httpbin:httpbin
worker:
build:
context: .
dockerfile: ./devops/docker/Dockerfile
depends_on:
- rabbitmq
- db
command: bash -c "./devops/scripts/wait-for-it.sh -t 120 db:5432 && ./devops/scripts/worker_server.sh"
environment:
- ENVIRONMENT=development
- DJANGO_SETTINGS_MODULE=configuration.settings
- SERVICE=messaging-service
- DB_USER=messaging-service
- DB_PASS=P@55w0rd
- DB_NAME=messaging-service
- DB_HOST=db
- DB_PORT=5432
- HTTPBIN_URL=http://httpbin:8000
- BROKER_URL=amqp://guest:guest@rabbitmq:5672//
- GCLOUD_PROJECT=pycon-monitoring-workshop
- REDIS_HOST=redis
- REDIS_PORT=6379
volumes:
- ./:/usr/src/app
- /app/static
- /var/log
- /var/log/nginx
ports:
- 80
- 9192:19999
links:
- rabbitmq:rabbitmq
- db:db
- httpbin:httpbin
rabbitmq:
build:
context: .
dockerfile: ./devops/docker/Rabbitmq.Dockerfile
ports:
- 5672:5672 # we forward this port because it's useful for debugging
- 15672:15672 # here, we can access rabbitmq management plugin
- 9193:19999
db:
build:
context: .
dockerfile: ./devops/docker/Postgres.Dockerfile
ports:
- 5433:5432
- 9196:19999
environment:
- POSTGRES_DB=messaging-service
- POSTGRES_USER=messaging-service
- POSTGRES_PASSWORD=P@55w0rd
redis:
build:
context: .
dockerfile: ./devops/docker/Redis.Dockerfile
ports:
- 6379:6379
- 9194:19999
smpp-simulator:
image: kwahome/smpp-smsc-sim:latest
ports:
- 2775:2775
- 8884:8884
- 9195:19999
swagger-ui:
build:
context: .
dockerfile: ./devops/docker/SwaggerUI.Dockerfile
environment:
- SWAGGER_HOST=${APP_DOMAIN:-localhost}:80
- API_URL=http://${APP_DOMAIN:-localhost}:${APP_PORT:-9001}/${FILE:-send-message}-1.0.yml
ports:
- 9001:8080
volumes:
- ./devops/scripts/swagger-ui-entrypoint.sh:/usr/share/nginx/swagger-ui-entrypoint.sh
- ./docs/api/swagger:/usr/share/nginx/swagger
httpbin:
image: citizenstig/httpbin
ports:
- 8000:8000
netdata:
build:
context: .
dockerfile: ./devops/docker/Netdata.Dockerfile
container_name: netdata
ports:
- 19999:19999
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- 3000:3000
volumes:
- /var/lib/grafana
prometheus:
image: prom/prometheus:v2.1.0
volumes:
- ./devops/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /prometheus
ports:
- 9090:9090