-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose-production.yml
243 lines (231 loc) · 9.72 KB
/
docker-compose-production.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
version: '3.8'
services:
db:
image: digitalexcellence/database
container_name: db
restart: unless-stopped
expose:
- "1433"
networks:
mssql-network:
ipv4_address: 172.16.238.2
environment:
- MSSQL_SA_PASSWORD=${PRODUCTION_DATABASE_PASSWORD}
volumes:
- ~/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:latest
container_name: api
restart: on-failure
networks:
- proxy
- mssql-network
- rabbitmq-network
depends_on:
- db
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/ubuntu/Uploads/Images:/app/Uploads/Images
environment:
- ConnectionStrings__DefaultConnection=${PRODUCTION_CONNECTION_STRING}
- App__Frontend__FrontendUrl=https://dex.software
- App__Frontend__ClientId=${PRODUCTION_API_FRONTEND_CLIENT_ID}
- App__Frontend__ClientSecret=${PRODUCTION_API_FRONTEND_CLIENT_SECRET}
- App__IdentityServer__IdentityUrl=https://identity.dex.software
- App__IdentityServer__ClientId=${API_CLIENT_ID}
- App__IdentityServer__ClientSecret=${API_AUTHENTICATION_CLIENT_SECRET}
- 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}
- Use__In_Memory_Database='false'
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entrypoints=http"
- "traefik.http.routers.api.rule=Host(`api.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.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:/app/certs
environment:
- ConnectionStrings__DefaultConnection=${IDENTITY_PRODUCTION_CONNECTION_STRING}
- App__Self__PublicOrigin=https://identity.dex.software
- App__Self__JwtAuthority=https://dex.software
- App__Api__DeXApiUrl=https://api.dex.software
- App__Api__ClientId=${API_CLIENT_ID}
- App__Api__ClientSecret=${API_CLIENT_SECRET}
- App__Frontend__RedirectUriFrontend=https://dex.software/auth-callback
- App__Frontend__RefreshUriFrontend=https://dex.software/silent-refresh.html
- App__Frontend__RedirectUriPostman=https://www.postman.com/oauth2/callback
- App__Frontend__PostLogoutUriFrontend=https://dex.software/
- App__Frontend__ClientId=${FRONTEND_CLIENT_ID}
- App__Frontend__ClientSecret=${FRONTEND_CLIENT_SECRET}
- App__swagger__RedirectUrisSwagger=https://api.dex.software/oauth2-redirect.html
- App__swagger__PostLogoutUrisSwagger=https://api.dex.software
- App__FfhictOIDC__ClientId=${FFHICTOIDC_CLIENT_ID}
- App__FfhictOIDC__ClientSecret=${FFHICTOIDC_CLIENT_SECRET}
- App__FfhictOIDC__RedirectUri=https://identity.dex.software/external/callback/fhict
- App__ApiAuthentication__ClientId=${API_AUTHENTICATION_CLIENT_ID}
- App__ApiAuthentication__ClientSecret=${API_AUTHENTICATION_CLIENT_SECRET}
- Cert_File=/app/identity.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://9ab54615b99746ddaff11714a636f56e@o395685.ingest.sentry.io/5256525
- Use__In_Memory_Database=false
labels:
- "traefik.enable=true"
- "traefik.http.routers.identity.entrypoints=http"
- "traefik.http.routers.identity.rule=Host(`identity.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.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__ApiKey=${App__SendGrid__ApiKey}
- App__SendGrid__EmailFrom=${App__SendGrid__EmailFrom}
stdin_open: true
tty: true
deploy:
restart_policy:
condition: on-failure
networks:
rabbitmq-network:
jobscheduler:
image: digitalexcellence/jobscheduler:latest
container_name: jobscheduler
restart: on-failure
environment:
- Config__IdentityServerConfig__IdentityUrl=https://identity.dex.software/
- Config__IdentityServerConfig__ClientId=${JOBSCHEDULER_IDENTITY_CLIENTID}
- Config__IdentityServerConfig__ClientSecret=${JOBSCHEDULER_IDENTITY_CLIENTSECRET}
- Config__ApiConfig__ApiUrl=https://api.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/frontend:latest
container_name: frontend
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.entrypoints=http"
- "traefik.http.routers.frontend.rule=Host(`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(`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:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.16.238.0/24
rabbitmq-network:
driver: bridge
proxy:
external: true