generated from fluffy-bunny/fluffycore-grpc-starterkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
224 lines (199 loc) · 9.83 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
212
213
214
215
216
217
218
219
220
221
222
223
224
services:
reverse-proxy:
extends:
file: ./docker-compose-common-proxy.yml
service: micro
image: traefik:latest
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
ports:
# Web
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
# Map the static configuration into the container
- ./config/static.yml:/etc/traefik/traefik.yml:ro
# Map the dynamic configuration into the container
- ./config/dynamic.yml:/etc/traefik/dynamic.yml:ro
# Map the certificats into the container
- ./certs:/etc/certs:ro
rage:
container_name: rage
extends:
file: ./docker-compose-common-rage.yml
service: micro
image: fluffycore.rage.oidc:latest
dns:
- 8.8.8.8
ports:
- "30051:30051"
- "30052:30052"
- "30053:30053"
- "9044:9044"
- "9045:9045"
env_file:
- .env
- .env.secrets
environment:
APPLICATION_ENVIRONMENT: "Production"
COOKIE_DOMAIN: "rage.localhost.dev"
RAGE_cookieConfig__domain: "rage.localhost.dev"
RAGE_sessionConfig__domain: "rage.localhost.dev"
ENABLE_GRPC_SERVER_REFLECTION: "true"
GRPC_GATEWAY_ENABLED: "true"
RAGE_GRPC_GATEWAY_ENABLED: "true"
RAGE_APPLICATION_NAME: "RAGE Account"
RAGE_APPLICATION_ENVIRONMENT: "Production"
RAGE_LOG_LEVEL: "debug"
RAGE_PRETTY_LOG: "true"
RAGE_PORT: "30051"
RAGE_REST_PORT: "30052"
RAGE_customString: "In Flames"
RAGE_someSecret: "1234567890"
RAGE_jwtValidators__issuers: "http://rage:30053"
RAGE_jwtValidators__jwksUrls: "http://rage:30053/.well-known/jwks"
RAGE_configFiles__oidcClientPath: "/config/oidc-clients.json"
RAGE_configFiles__idpsPath: "/config/idps.json"
RAGE_configFiles__ragePath: "/config/rage.json"
RAGE_configFiles__signingKeyJsonPath: "/config/signing-keys.json"
RAGE_emailConfig__host: "${RAGE_SMTP_HOST}:25"
RAGE_emailConfig__auth__plainAuth__host: "${RAGE_SMTP_HOST}"
RAGE_emailConfig__auth__plainAuth__username: "${SMTP4DEV_SMTP_CONFIG__USER}"
RAGE_emailConfig__auth__plainAuth__password: "${SMTP4DEV_SMTP_CONFIG__PASSWORD}"
RAGE_emailConfig__auth__plainAuth__identity: "${RAGE_SMTP_HOST}"
RAGE_selfIDPConfig__redirectUrl: "https://rage.localhost.dev/auth/callback"
RAGE_selfIDPConfig__authority: "https://rage.localhost.dev"
RAGE_oidcConfig__baseUrl: "https://rage.localhost.dev"
RAGE_emailConfig__justLogIt: "true"
RAGE_echo__disableSecureCookies: "true"
RAGE_echo__port: "9044"
RAGE_echoOIDCUI__port: "9045"
RAGE_echoAccount__port: "9046"
RAGE_systemConfig__developerMode: "true"
RAGE_oidcUIConfig__appSettings__ApplicationEnvironment: "Production"
___RAGE_oidcUIConfig__appSettings__BaseApiUrl: "https://rage.localhost.dev"
RAGE_oidcUIConfig__staticFilePath: "./static/blazor/oidc-login-ui/wwwroot"
___RAGE_oidcUIConfig__uriEntryPath: "https://oidc.rage.localhost.dev"
RAGE_accountAppSettings__BaseApiUrl: "https://rage.localhost.dev"
RAGE_accountAppSettings__ApplicationEnvironment: "Production"
RAGE_apiAppSettings__ApplicationEnvironment: "Production"
RAGE_apiAppSettings__BaseApiUrl: "https://rage.localhost.dev"
RAGE_oidcUIConfig__cacheBustingConfig__filePath: "./static/blazor/oidc-login-ui/wwwroot/index_template.html"
RAGE_oidcUIConfig__cacheBustingConfig__staticPath: "./static/blazor/oidc-login-ui/wwwroot/"
labels:
# Enable this container to be mapped by traefik
# For more information, see: https://docs.traefik.io/providers/docker/#exposedbydefault
- "traefik.enable=true"
# Define the network that should be used
- "traefik.docker.network=proxy"
# URL to reach this container
- "traefik.enable=true"
# Configuration for rage.localhost.dev
- "traefik.http.routers.rage.rule=Host(`rage.localhost.dev`)"
- "traefik.http.routers.rage.service=rage"
- "traefik.http.services.rage.loadbalancer.server.port=9044"
# Configuration for oidc.rage.localhost.dev (previously rage-oidc.localhost.dev)
- "traefik.http.routers.rage-oidc.rule=Host(`oidc.rage.localhost.dev`)"
- "traefik.http.routers.rage-oidc.service=rage-oidc"
- "traefik.http.services.rage-oidc.loadbalancer.server.port=9045"
# Enable TLS for both routers
- "traefik.http.routers.rage.tls=true"
- "traefik.http.routers.rage-oidc.tls=true"
# CORS Middleware
- "traefik.http.middlewares.cors-headers.headers.accesscontrolalloworiginlist=https://oidc.rage.localhost.dev,https://rage.localhost.dev"
- "traefik.http.middlewares.cors-headers.headers.accesscontrolallowmethods=GET,POST,PUT,DELETE,OPTIONS"
- "traefik.http.middlewares.cors-headers.headers.accesscontrolallowheaders=Content-Type,Authorization,x-csrf-token"
- "traefik.http.middlewares.cors-headers.headers.accesscontrolallowcredentials=true"
- "traefik.http.middlewares.cors-headers.headers.accesscontrolmaxage=100"
- "traefik.http.middlewares.cors-headers.headers.addvaryheader=true"
# Apply CORS middleware to both routers
- "traefik.http.routers.rage.middlewares=cors-headers"
- "traefik.http.routers.rage-oidc.middlewares=cors-headers"
volumes:
- ./cmd/server/config/rage.docker.json:/config/rage.json
- ./cmd/server/config/oidc-clients.json:/config/oidc-clients.json
- ./cmd/server/config/idps.docker.json:/config/idps.json
- ./cmd/server/config/signing-keys.json:/config/signing-keys.json
- ./cmd/server/config/seed-users.json:/config/seed-users.json
entrypoint: ["/app/server", "serve"]
whoami:
extends:
file: ./docker-compose-common-rage.yml
service: micro
image: containous/whoami
container_name: whoami
security_opt:
- no-new-privileges:true
labels:
# Enable this container to be mapped by traefik
# For more information, see: https://docs.traefik.io/providers/docker/#exposedbydefault
- "traefik.enable=true"
# Define the network that should be used
- "traefik.docker.network=proxy"
# URL to reach this container
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost.dev`)"
# Activation of TLS
- "traefik.http.routers.whoami.tls=true"
# If port is different than 80, use the following service:
# - "traefik.http.services.<service_name>.loadbalancer.server.port=<port>"
smtp4dev:
extends:
file: ./docker-compose-common-rage.yml
service: micro
image: rnwood/smtp4dev:v3
restart: always
ports:
# Change the number before : to the port the web interface should be accessible on
- "${SMTP4DEV_WEB_PORT}:80"
# Change the number before : to the port the SMTP server should be accessible on
- "25:25"
# Change the number before : to the port the IMAP server should be accessible on
- "143:143"
volumes:
# This is where smtp4dev stores the database..
- smtp4dev-data:/smtp4dev
environment:
# Uncomment to customise these settings
#Specifies the virtual path from web server root where SMTP4DEV web interface will be hosted. e.g. "/" or "/smtp4dev"
#- ServerOptions__BasePath=/smtp4dev
#Specifies the server hostname. Used in auto-generated TLS certificate if enabled.
- ServerOptions__HostName=smtp4dev
#Locks settings from being changed by user via web interface
#- ServerOptions__LockSettings=true
#Specifies the path where the database will be stored relative to APPDATA env var on Windows or XDG_CONFIG_HOME on non-Windows. Specify "" to use an in memory database.
#- ServerOptions__Database=database.db
#Specifies the number of messages to keep
#- ServerOptions__NumberOfMessagesToKeep=100
#Specifies the number of sessions to keep
#- ServerOptions__NumberOfSessionsToKeep=100
#Specifies the TLS mode to use. None=Off. StartTls=On demand if client supports STARTTLS. ImplicitTls=TLS as soon as connection is established.
- ServerOptions__TlsMode=STARTTLS
#Specifies the TLS certificate to use if TLS is enabled/requested. Specify "" to use an auto-generated self-signed certificate (then see console output on first startup)
#- ServerOptions__TlsCertificate=
#Sets the name of the SMTP server that will be used to relay messages or "" if messages should not be relayed
#- RelayOptions__SmtpServer=
#Sets the port number for the SMTP server used to relay messages.
#- RelayOptions__SmtpPort=25
#Specifies a comma separated list of recipient addresses for which messages will be relayed. An empty list means that no messages are relayed.
#- RelayOptions__AllowedEmailsString=
#Specifies the address used in MAIL FROM when relaying messages. (Sender address in message headers is left unmodified). The sender of each message is used if not specified.
#- RelayOptions__SenderAddress=
#The username for the SMTP server used to relay messages. If "" no authentication is attempted.
#- RelayOptions__Login=
#The password for the SMTP server used to relay messages
#- RelayOptions__Password=
#Specifies the port the IMAP server will listen on - allows standard email clients to view/retrieve messages
#"ServerOptions__ImapPort"=143
#====================================================
# NETWORKS
#====================================================
networks:
proxy:
#====================================================
# VOLUMES
#====================================================
volumes:
smtp4dev-data: