Update Servers/Containerization/Docker/Compose/Keycloak.md
This commit is contained in:
@ -27,7 +27,7 @@ sequenceDiagram
|
||||
|
||||
=== "docker-compose.yml"
|
||||
|
||||
``` yaml
|
||||
```yaml
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
@ -120,7 +120,7 @@ sequenceDiagram
|
||||
|
||||
=== ".env"
|
||||
|
||||
``` yaml
|
||||
```yaml
|
||||
POSTGRES_DB=keycloak
|
||||
POSTGRES_USER=keycloak
|
||||
POSTGRES_PASSWORD=SomethingSecure # (1)
|
||||
@ -133,7 +133,7 @@ sequenceDiagram
|
||||
|
||||
## Traefik Reverse Proxy Configuration
|
||||
If the container does not run on the same host as Traefik, you will need to manually add configuration to Traefik's dynamic config file, outlined below.
|
||||
``` yaml
|
||||
```yaml
|
||||
http:
|
||||
routers:
|
||||
auth:
|
||||
@ -202,13 +202,13 @@ At this point, within Keycloak, you need to configure domains that you are allow
|
||||
## Adding Middleware to Dynamic Traefik Service Config Files
|
||||
At this point, you are in the final stretch, you just need to add the middleware to the Traefik dynamic config files to ensure that it routes the traffic to Keycloak when someone attempts to access that service. Put the following middleware section under the `routers:` section of the config file.
|
||||
|
||||
``` yaml
|
||||
```yaml
|
||||
middlewares:
|
||||
- auth-bunny-lab-io # Referencing the Keycloak Server
|
||||
```
|
||||
|
||||
A full example config file would look like the following:
|
||||
``` yaml
|
||||
```yaml
|
||||
http:
|
||||
routers:
|
||||
example:
|
||||
|
Reference in New Issue
Block a user