-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-0.1.0.yml
executable file
·231 lines (231 loc) · 6.97 KB
/
docker-compose-0.1.0.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
version: '3.6'
networks:
location-tracker-net:
services:
archiver:
image: dsniatecki/archiver:0.1.0
container_name: archiver
environment:
GUARD_CERT_URI: "http://guard:8080/realms/location-tracker/protocol/openid-connect/certs"
DB_HOST: archiver-db
DB_NAME: archiver
DB_USER: archiver
DB_PASSWORD: archiver
SPRING_RABBITMQ_HOST: archiver-msg-broker
SPRING_RABBITMQ_USERNAME: archiver
SPRING_RABBITMQ_PASSWORD: archiver
SPRING_RABBITMQ_VIRTUAL_HOST: location-tracker
SPRING_RABBITMQ_OBJECT_LOCATION_SOURCE_QUEUE: archiver.object.location.source.queue
SPRING_RABBITMQ_OBJECT_LOCATION_REQUEST_QUEUE: archiver.object.location.request.queue
SPRING_RABBITMQ_SSL_ENABLED: 'false'
ports:
- '10030:8080'
networks:
- location-tracker-net
depends_on:
- archiver-db
- archiver-msg-broker
- guard
archiver-db:
image: timescale/timescaledb:2.6.0-pg14
container_name: archiver-db
environment:
POSTGRES_USER: archiver
POSTGRES_PASSWORD: archiver
POSTGRES_DB: archiver
ports:
- '11030:5432'
networks:
- location-tracker-net
archiver-msg-broker:
image: rabbitmq:3.9.8-management-alpine
container_name: archiver-msg-broker
environment:
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbitmq_management load_definitions '/tmp/definitions.json'"
volumes:
- ./archiver/src/test/resources/rabbitmq-test-definitions.json:/tmp/definitions.json
ports:
- '5671:5671'
- '5672:5672'
- '15672:15672'
- '15692:15692'
networks:
- location-tracker-net
receiver:
image: dsniatecki/receiver:0.1.0
container_name: receiver
environment:
GUARD_CERT_URI: "http://guard:8080/realms/location-tracker/protocol/openid-connect/certs"
SPRING_RABBITMQ_HOST: archiver-msg-broker
SPRING_RABBITMQ_USERNAME: archiver
SPRING_RABBITMQ_PASSWORD: archiver
SPRING_RABBITMQ_VIRTUAL_HOST: location-tracker
SPRING_RABBITMQ_OBJECT_LOCATION_EXCHANGE: archiver.exchange
SPRING_RABBITMQ_OBJECT_LOCATION_STORE_ROUTING_KEY: archiver-object-location-source
SPRING_RABBITMQ_SSL_ENABLED: 'false'
ports:
- '10020:8080'
networks:
- location-tracker-net
depends_on:
- archiver
- guard
storage:
image: dsniatecki/storage:0.1.0
container_name: storage
environment:
GUARD_CERT_URI: "http://guard:8080/realms/location-tracker/protocol/openid-connect/certs"
DB_HOST: storage-db
DB_NAME: storage
DB_USER: storage
DB_PASSWORD: storage
ports:
- '10010:8080'
networks:
- location-tracker-net
depends_on:
- storage-db
- guard
storage-db:
image: postgres:14-alpine
container_name: storage-db
environment:
POSTGRES_USER: storage
POSTGRES_PASSWORD: storage
POSTGRES_DB: storage
ports:
- '11010:5432'
networks:
- location-tracker-net
performer:
image: dsniatecki/performer:0.1.0
container_name: performer
environment:
SPRING_MAIL_HOST: "smtp-server"
SPRING_MAIL_PORT: 1025
PERFORMER_STORAGE_BASE_PATH: 'http://storage:8080/api/internal'
PERFORMER_ARCHIVER_BASE_PATH: 'http://archiver:8080/api/internal'
PERFORMER_JOBS_LOCATION_SNAPSHOT_SCHEDULER_CRON: '1 * * * * *'
PERFORMER_JOBS_LOCATION_SNAPSHOT_TOLERANCE: 24h
PERFORMER_JOBS_LOCATION_SNAPSHOT_SFTP_HOST: sftp-server
PERFORMER_JOBS_LOCATION_SNAPSHOT_SFTP_PORT: 22
PERFORMER_JOBS_LOCATION_SNAPSHOT_SFTP_USER: performer
PERFORMER_JOBS_LOCATION_SNAPSHOT_SFTP_PASSWORD: performer
PERFORMER_JOBS_LOCATION_SNAPSHOT_SFTP_PATH: upload
ports:
- '10040:8080'
networks:
- location-tracker-net
depends_on:
- sftp-server
- storage
- archiver
proxy:
image: dsniatecki/proxy:0.1.0
container_name: proxy
volumes:
- ./utils/proxy/nginx.conf:/etc/nginx/nginx.conf
- ./visualizer/dist/visualizer:/usr/share/nginx/html
ports:
- '8000:80'
networks:
- location-tracker-net
depends_on:
- storage
- receiver
- archiver
- guard
- grafana
guard:
image: quay.io/keycloak/keycloak:18.0.0
container_name: guard
command:
- start-dev
environment:
JAVA_OPTS: '-Dkeycloak.import=/tmp/location-tracker-realm.json -Dmetrics.enabled=true -Dhealth.enabled=true'
DB_VENDOR: POSTGRES
DB_ADDR: guard-db
DB_DATABASE: guard
DB_SCHEMA: public
DB_USER: guard
DB_PASSWORD: guard
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KEYCLOAK_STATISTICS: 'all'
PROXY_ADDRESS_FORWARDING: 'true'
volumes:
- ./utils/guard/location-tracker-realm.json:/tmp/location-tracker-realm.json
ports:
- '11050:8080'
networks:
- location-tracker-net
depends_on:
- guard-db
- smtp-server
guard-db:
image: postgres:14-alpine
container_name: guard-db
environment:
POSTGRES_USER: guard
POSTGRES_PASSWORD: guard
POSTGRES_DB: guard
ports:
- '11040:5432'
networks:
- location-tracker-net
alert-manager:
image: prom/alertmanager:v0.23.0
container_name: alert-manager
command: --config.file=/config/alertmanager.yml --log.level=info
volumes:
- ./utils/alertmanager/alertmanager.yml:/config/alertmanager.yml
ports:
- '11193:9093'
networks:
- location-tracker-net
depends_on:
- prometheus
grafana:
image: grafana/grafana:8.2.6
container_name: grafana
environment:
GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH: '/var/lib/grafana/dashboards/archiver_dashboard.json'
GF_SERVER_ROOT_URL: '%(protocol)s://%(domain)s:/grafana'
volumes:
- ./utils/grafana/provisioning:/etc/grafana/provisioning
- ./utils/grafana/dashboards:/var/lib/grafana/dashboards
ports:
- '11000:3000'
networks:
- location-tracker-net
depends_on:
- prometheus
prometheus:
image: prom/prometheus:v2.33.3
container_name: prometheus
command: --config.file=/etc/prometheus/prometheus.yml --log.level=info
volumes:
- ./utils/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- ./utils/prometheus/alerts.yml:/etc/prometheus/alerts.yml
ports:
- '11190:9090'
networks:
- location-tracker-net
sftp-server:
image: atmoz/sftp:alpine
command: performer:performer:1001
container_name: sftp-server
volumes:
- ./sftp-store:/home/performer/upload
ports:
- '11022:22'
networks:
- location-tracker-net
smtp-server:
image: mailhog/mailhog:v1.0.1
container_name: smtp-server
ports:
- '11025:1025'
- '11005:8025'
networks:
- location-tracker-net