-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose-staging.yml
254 lines (241 loc) · 10.4 KB
/
docker-compose-staging.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
version: '3.8'
services:
db:
image: digitalexcellence/database
container_name: db
restart: unless-stopped
ports:
- 1433:1433
networks:
mssql-network:
ipv4_address: 172.16.238.2
environment:
- MSSQL_SA_PASSWORD=${STAGING_DATABASE_PASSWORD}
volumes:
- ~/docker_compose/create-trigger-new-user.sql:/opt/create-trigger-new-user.sql
- ~/docker_compose/new_user.sql:/opt/new_user.sql
- ~/docker_compose/add_user.sql:/opt/add_user.sql
- ~/docker_compose/test-mail.sql:/opt/test-mail.sql
- ~/docker_compose/create_profile.sql:/opt/create_profile.sql
- ~/docker_compose/enable-mail.sql:/opt/enable-mail.sql
- ~/docker_compose/create-trigger.sql:/opt/create-trigger.sql
- ~/docker_compose/backup:/var/opt/mssql/backup
- ~/docker_compose/data:/var/opt/mssql/data
rabbitmq:
container_name: rabbitmq
image: 'bitnami/rabbitmq:3.8.9'
restart: unless-stopped
environment:
- RABBITMQ_USERNAME=${App__RabbitMQ__Username}
- RABBITMQ_PASSWORD=${App__RabbitMQ__Password}
ports:
- 5672:5672
- 5671:5671
- 15672:15672
networks:
rabbitmq-network:
api:
image: digitalexcellence/api
container_name: api
restart: on-failure
networks:
- proxy
- mssql-network
- rabbitmq-network
depends_on:
- db
- rabbitmq
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/ubuntu/Uploads/Images:/app/Uploads/Images
environment:
- ConnectionStrings__DefaultConnection=${STAGING_CONNECTION_STRING}
- App__Frontend__FrontendUrl=https://staging.dex.software
- App__Frontend__ClientId=${STAGING_API_FRONTEND_CLIENT_ID}
- App__Frontend__ClientSecret=${STAGING_API_FRONTEND_CLIENT_SECRET}
- App__IdentityServer__IdentityUrl=https://identity.staging.dex.software
- App__IdentityServer__ClientId=${API_CLIENT_ID}
- App__IdentityServer__ClientSecret=${API_AUTHENTICATION_CLIENT_SECRET}
- SENTRY_DSN=https://[email protected]/5247967
- App__RabbitMQ__Hostname=${App__RabbitMQ__Hostname}
- App__RabbitMQ__Username=${App__RabbitMQ__Username}
- App__RabbitMQ__Password=${App__RabbitMQ__Password}
- App__DataSources__Github__ClientId=${App__DataSources__Github__ClientId}
- App__DataSources__Github__ClientSecret=${App__DataSources__Github__ClientSecret}
- App__DataSources__Github__RedirectUri=${App__DataSources__Github__RedirectUri}
- App__DataSources__Gitlab__ClientId=${App__DataSources__Gitlab__ClientId}
- App__DataSources__Gitlab__ClientSecret=${App__DataSources__Gitlab__ClientSecret}
- App__DataSources__Gitlab__RedirectUri=${App__DataSources__Gitlab__RedirectUri}
- App__Elastic__Hostname=${App__ElasticSearch__Hostname}
- App__Elastic__Username=${App__ElasticSearch__Username}
- App__Elastic__Password=${App__ElasticSearch__Password}
- App__Elastic__IndexUrl=${App__ElasticSearch__IndexUrl}
- App__SendGrid__EmailFrom=${App__SendGrid__EmailFrom}
- App__SendGrid__ApiKey=${App__SendGrid__ApiKey}
- Use__In_Memory_Database='false'
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entrypoints=http"
- "traefik.http.routers.api.rule=Host(`api.staging.dex.software`)"
- "traefik.http.middlewares.api-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.api.middlewares=api-https-redirect"
- "traefik.http.routers.api-secure.entrypoints=https"
- "traefik.http.routers.api-secure.rule=Host(`api.staging.dex.software`)"
- "traefik.http.routers.api-secure.tls=true"
- "traefik.http.routers.api-secure.tls.certresolver=http"
- "traefik.http.routers.api-secure.service=api"
- "traefik.http.services.api.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
identity:
image: digitalexcellence/identity:latest
container_name: identity
restart: on-failure
depends_on:
- db
networks:
- proxy
- mssql-network
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/ubuntu/certs/identity:/app/certs
environment:
- ConnectionStrings__DefaultConnection=${IDENTITY_STAGING_CONNECTION_STRING}
- App__Self__PublicOrigin=https://identity.staging.dex.software
- App__Self__JwtAuthority=https://staging.dex.software
- App__Api__DeXApiUrl=https://api.staging.dex.software
- App__Api__ClientId=${API_CLIENT_ID}
- App__Api__ClientSecret=${API_CLIENT_SECRET}
- App__Frontend__RedirectUriFrontend=https://staging.dex.software/auth-callback
- App__Frontend__RedirectUriPostman=https://www.postman.com/oauth2/callback
- App__Frontend__RefreshUriFrontend=https://staging.dex.software/silent-refresh.html
- App__Frontend__PostLogoutUriFrontend=https://staging.dex.software/
- App__Frontend__ClientId=${FRONTEND_CLIENT_ID}
- App__Frontend__ClientSecret=${FRONTEND_CLIENT_SECRET}
- App__swagger__RedirectUrisSwagger=https://api.staging.dex.software/oauth2-redirect.html
- App__swagger__PostLogoutUrisSwagger=https://api.staging.dex.software
- App__FfhictOIDC__ClientId=${FFHICTOIDC_CLIENT_ID}
- App__FfhictOIDC__ClientSecret=${FFHICTOIDC_CLIENT_SECRET}
- App__FfhictOIDC__RedirectUri=https://identity.staging.dex.software/external/callback/fhict
- Cert_File=/app/identity.staging.dex.software_pfx.pfx
- Cert_Thumb=${CERT_THUMB}
- Cert_Password=${CERT_PASSWORD}
- App__JobScheduler__ClientId=${JOBSCHEDULER_IDENTITY_CLIENTID}
- App__JobScheduler__ClientSecret=${JOBSCHEDULER_IDENTITY_CLIENTSECRET}
- SENTRY_DSN=https://[email protected]/5256525
- Use__In_Memory_Database=false
labels:
- "traefik.enable=true"
- "traefik.http.routers.identity.entrypoints=http"
- "traefik.http.routers.identity.rule=Host(`identity.staging.dex.software`)"
- "traefik.http.middlewares.identity-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.identity.middlewares=api-https-redirect"
- "traefik.http.routers.identity-secure.entrypoints=https"
- "traefik.http.routers.identity-secure.rule=Host(`identity.staging.dex.software`)"
- "traefik.http.routers.identity-secure.tls=true"
- "traefik.http.routers.identity-secure.tls.certresolver=http"
- "traefik.http.routers.identity-secure.service=identity"
- "traefik.http.services.identity.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
notificationservice:
container_name: notificationservice
image: digitalexcellence/notificationservice
restart: on-failure
build:
context: .
dockerfile: NotificationSystem/Dockerfile
depends_on:
- rabbitmq
environment:
- App__RabbitMQ__Hostname=${App__RabbitMQ__Hostname}
- App__RabbitMQ__Username=${App__RabbitMQ__Username}
- App__RabbitMQ__Password=${App__RabbitMQ__Password}
- App__SendGrid__EmailFrom=${App__SendGrid__EmailFrom}
- App__SendGrid__ApiKey=${App__SendGrid__ApiKey}
stdin_open: true
tty: true
networks:
rabbitmq-network:
jobscheduler:
image: digitalexcellence/jobscheduler:latest
container_name: jobscheduler
restart: on-failure
depends_on:
- rabbitmq
environment:
- Config__IdentityServerConfig__IdentityUrl=https://identity.staging.dex.software/
- Config__IdentityServerConfig__ClientId=${JOBSCHEDULER_IDENTITY_CLIENTID}
- Config__IdentityServerConfig__ClientSecret=${JOBSCHEDULER_IDENTITY_CLIENTSECRET}
- Config__ApiConfig__ApiUrl=https://api.staging.dex.software/
- Config__RabbitMQ__Hostname=${App__RabbitMQ__Hostname}
- Config__RabbitMQ__Username=${App__RabbitMQ__Username}
- Config__RabbitMQ__Password=${App__RabbitMQ__Password}
networks:
rabbitmq-network:
mssql-network:
elasticsynchronizer:
image: digitalexcellence/elasticsynchronizer:latest
container_name: elasticsynchronizer
restart: on-failure
depends_on:
- rabbitmq
environment:
- App__RabbitMQ__Hostname=${App__RabbitMQ__Hostname}
- App__RabbitMQ__Username=${App__RabbitMQ__Username}
- App__RabbitMQ__Password=${App__RabbitMQ__Password}
- App__Elastic__Hostname=${App__ElasticSearch__Hostname}
- App__Elastic__Username=${App__ElasticSearch__Username}
- App__Elastic__Password=${App__ElasticSearch__Password}
- App__Elastic__IndexUrl=${App__ElasticSearch__IndexUrl}
networks:
rabbitmq-network:
mssql-network:
elasticsearch:
image: digitalexcellence/elasticsearch:latest
container_name: elasticsearch
ports:
- "9200:9200"
- "9300:9300"
volumes:
- elasticsearch:/usr/share/elasticsearch/data
- /home/ubuntu/docker_compose/elasticonfig/wn_s.txt:/usr/share/elasticsearch/config/analysis/wn_s.txt
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
ELASTIC_PASSWORD: ${App__ElasticSearch__Password}
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node
networks:
mssql-network:
frontend:
image: digitalexcellence/stagingfrontend
container_name: frontend
restart: on-failure
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.entrypoints=http"
- "traefik.http.routers.frontend.rule=Host(`staging.dex.software`)"
- "traefik.http.middlewares.frontend-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.frontend.middlewares=api-https-redirect"
- "traefik.http.routers.frontend-secure.entrypoints=https"
- "traefik.http.routers.frontend-secure.rule=Host(`staging.dex.software`)"
- "traefik.http.routers.frontend-secure.tls=true"
- "traefik.http.routers.frontend-secure.tls.certresolver=http"
- "traefik.http.routers.frontend-secure.service=frontend"
- "traefik.http.services.frontend.loadbalancer.server.port=443"
- "traefik.docker.network=proxy"
volumes:
elasticsearch:
networks:
mssql-network:
internal: true
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
rabbitmq-network:
driver: bridge
proxy:
external: true