mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2024-11-24 00:40:21 +00:00
Create docker-compose.yaml
This commit is contained in:
parent
3bf56e040a
commit
e4516f9a91
1 changed files with 51 additions and 0 deletions
51
Keycloak/docker-compose.yaml
Normal file
51
Keycloak/docker-compose.yaml
Normal file
|
@ -0,0 +1,51 @@
|
|||
version: '3'
|
||||
services:
|
||||
postgresql:
|
||||
image: postgres:16
|
||||
environment:
|
||||
- POSTGRES_USER=keycloak
|
||||
- POSTGRES_DB=keycloak
|
||||
- POSTGRES_PASSWORD=SUPERsecret
|
||||
volumes:
|
||||
- '/home/ubuntu/docker/keycloak/postgresql_data:/var/lib/postgresql/data'
|
||||
networks:
|
||||
keycloak:
|
||||
|
||||
keycloak:
|
||||
image: quay.io/keycloak/keycloak:22.0.3
|
||||
restart: always
|
||||
command: start
|
||||
depends_on:
|
||||
- postgresql
|
||||
environment:
|
||||
- KC_PROXY_ADDRESS_FORWARDING=true
|
||||
- KC_HOSTNAME_STRICT=false
|
||||
- KC_HOSTNAME=keycloak.jimsgarage.co.uk
|
||||
- KC_PROXY=edge
|
||||
- KC_HTTP_ENABLED=true
|
||||
- DB=keycloak
|
||||
- DB_URL='jdbc:postgresql://postgres:5432/postgresql?ssl=allow'
|
||||
- DB_USERNAME=keycloak
|
||||
- DB_PASSWORD=SUPERsecret
|
||||
- KEYCLOAK_ADMIN=admin
|
||||
- KEYCLOAK_ADMIN_PASSWORD=password
|
||||
networks:
|
||||
proxy:
|
||||
keycloak:
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.keycloak.entrypoints=http"
|
||||
- "traefik.http.routers.keycloak.rule=Host(`keycloak.yourdomain.com`)"
|
||||
- "traefik.http.middlewares.keycloak-https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.keycloak.middlewares=keycloak-https-redirect"
|
||||
- "traefik.http.routers.keycloak-secure.entrypoints=https"
|
||||
- "traefik.http.routers.keycloak-secure.rule=Host(`keycloak.yourdomain.com`)"
|
||||
- "traefik.http.routers.keycloak-secure.tls=true"
|
||||
- "traefik.http.routers.keycloak-secure.service=keycloak"
|
||||
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
|
||||
- "traefik.docker.network=proxy"
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
keycloak:
|
Loading…
Reference in a new issue