-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
211 lines (196 loc) · 5.49 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
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
version: '3.4'
# Prepare a certificate:
# dotnet dev-certs https -ep ${APPDATA}\ASP.NET\Https\localhost.pfx -p crypticpassword
# dotnet dev-certs https --trust
services:
keycloak:
image: jboss/keycloak:latest
container_name: iam
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- KEYCLOAK_IMPORT=/config/realm-export.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
volumes:
- ./keycloak-configs:/config
- ./volumes/keycloak_data:/opt/jboss/keycloak/standalone/data
ports:
- 8080:8080
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
container_name: sqlserver
profiles: [ all, backend, dashboard, tiles, datasource ]
ports:
- "1433:1433"
environment:
SA_PASSWORD: "p@ssw0rd"
ACCEPT_EULA: "Y"
MSYS_NO_PATHCONV: 1
healthcheck:
test: [ "CMD", "sqlcmd", "-U", "sa", "-P", "p@ssw0rd", "-Q", "SELECT 1" ]
interval: 15s
timeout: 30s
retries: 3
start_period: 60s
deploy:
resources:
limits:
cpus: '2.0'
memory: 8G
reservations:
cpus: '1.0'
memory: 4G
volumes:
- type: bind
source: ./volumes/sql_data
target: /var/opt/mssql/data
eventbus:
image: rabbitmq:3-management
container_name: eventbus
profiles: [ all, eventbus, backend, dashboard, tiles, datasource, uiinfo ]
ports:
- "15672:15672"
- "5672:5672"
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: p@ssw0rd
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 15s
timeout: 30s
retries: 3
start_period: 60s
# Consider secure mode in prod as described here: https://developers.eventstore.com/server/v20.10/installation.html#use-docker-compose
eventstore:
image: eventstore/eventstore:latest
container_name: eventstore
profiles: [ all, backend, proxy ]
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All
- EVENTSTORE_START_STANDARD_PROJECTIONS=true
- EVENTSTORE_EXT_TCP_PORT=1113
- EVENTSTORE_HTTP_PORT=2113
- EVENTSTORE_INSECURE=true
- EVENTSTORE_ENABLE_EXTERNAL_TCP=true
- EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
ports:
- "1113:1113"
- "2113:2113"
volumes:
- type: bind
source: "/D/Volumes/eventstore/data"
target: /var/lib/eventstore
- type: bind
source: ./volumes/eventstore_data_logs
target: /var/log/eventstore
frontend:
image: ${DOCKER_REGISTRY-}frontend:latest
container_name: "thedashboard_frontend"
profiles: [ all, frontend ]
build:
context: .
dockerfile: TheDashboard.Frontend/Dockerfile
depends_on:
- keycloak
- proxy
- thedashboard.dashboardservice
- thedashboard.tileservice
- thedashboard.datasourceservice
- thedashboard.uiinfoservice
ports:
- "7501:80"
- "7500:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:443;http://+:80
- ASPNETCORE_Kestrel__Certificates__Default__Password=cryptickey
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/TheDashboard.Frontend.pfx
volumes:
- ~/.aspnet/https:/https:ro
proxy:
image: ${DOCKER_REGISTRY-}proxy:latest
container_name: proxy
profiles: [ all, backend, proxy ]
build:
context: .
dockerfile: TheDashboard.Proxy/Dockerfile
ports:
- "5000:5000/tcp"
depends_on:
- eventstore
- eventbus
thedashboard.dashboardservice:
image: ${DOCKER_REGISTRY-}dashboardservice:latest
container_name: "thedashboard_dashboard_service"
profiles: [ all, backend, dashboard ]
build:
context: .
dockerfile: TheDashboard.DashboardService/Dockerfile
ports:
- "5100:80/tcp"
depends_on:
- sqlserver
- eventbus
thedashboard.tileservice:
image: ${DOCKER_REGISTRY-}tileservice
container_name: "thedashboard_tile_service"
profiles: [ all, backend, tiles ]
build:
context: .
dockerfile: TheDashboard.TileService/Dockerfile
ports:
- "5200:80/tcp"
depends_on:
- sqlserver
- eventbus
thedashboard.datasourceservice:
image: ${DOCKER_REGISTRY-}datasourceservice
container_name: "thedashboard_datasource_service"
profiles: [ all, backend, datasource ]
build:
context: .
dockerfile: TheDashboard.DataSourceService/Dockerfile
ports:
- "5300:80/tcp"
depends_on:
- sqlserver
- eventbus
thedashboard.uiinfoservice:
image: ${DOCKER_REGISTRY-}uiinfoservice
container_name: "thedashboard_uiinfo_service"
profiles: [ all, backend, uiinfo ]
build:
context: .
dockerfile: TheDashboard.UiInfoservice/Dockerfile
ports:
- "5400:80/tcp"
depends_on:
- sqlserver
- eventbus
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
command:
- '--config.file=/etc/prometheus/prometheus.yml'
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
volumes:
- ./volumes/grafana_data:/var/lib/grafana
environment:
GF_SECURITY_ADMIN_PASSWORD: mypassword
volumes:
keycloak_data:
sql_data:
eventstore_data:
eventstore_data_logs:
grafana_data:
prometheus_data:
networks:
proxynet: