update
This commit is contained in:
parent
aea8721d06
commit
ce61d5d5ca
2 changed files with 25 additions and 28 deletions
|
@ -1,16 +1,5 @@
|
||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
x-app-common: &odc_app
|
|
||||||
build: .
|
|
||||||
environment:
|
|
||||||
APACHE_DOCUMENT_ROOT: "public/"
|
|
||||||
PHP_EXTENSION_XDEBUG: "1"
|
|
||||||
PHP_INI_MEMORY_LIMIT: "1G"
|
|
||||||
PHP_EXTENSION_LDAP: 1
|
|
||||||
PHP_EXTENSION_INTL: 1
|
|
||||||
MAILER_DSN: ${MAILER_DSN}
|
|
||||||
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
traefik-odc:
|
traefik-odc:
|
||||||
image: "traefik:v2.5"
|
image: "traefik:v2.5"
|
||||||
|
@ -41,7 +30,7 @@ services:
|
||||||
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
|
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
|
||||||
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||||
|
|
||||||
- "traefik.http.routers.traefik-odc.rule=Host(`traefik.${PUBLIC_URL}`)"
|
- "traefik.http.routers.traefik-odc.rule=Host(`traefik.<clientUrl>`)"
|
||||||
- "traefik.http.routers.traefik-odc.entrypoints=web"
|
- "traefik.http.routers.traefik-odc.entrypoints=web"
|
||||||
- "traefik.http.routers.traefik-odc.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.traefik-odc.tls.certresolver=letsencrypt"
|
||||||
- "traefik.http.routers.traefik-odc.service=api@internal"
|
- "traefik.http.routers.traefik-odc.service=api@internal"
|
||||||
|
@ -67,19 +56,17 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: mysql://odc:${ODC_DB_PW}@${RANDOMTAG}db-odc:3306/odc
|
DATABASE_URL: mysql://odc:<odcMySqlPw>@db-odc:3306/odc
|
||||||
OAUTH_KEYCLOAK_CLIENT_ID: opendatenschutzcenter
|
OAUTH_KEYCLOAK_CLIENT_ID: opendatenschutzcenter
|
||||||
OAUTH_KEYCLOAK_CLIENT_SECRET: ${OAUTH_KEYCLOAK_CLIENT_SECRET}
|
OAUTH_KEYCLOAK_CLIENT_SECRET: <clientsecret>
|
||||||
OAUTH_KEYCLOAK_SERVER: ${HTTP_METHOD}://${PUBLIC_URL}/keycloak
|
OAUTH_KEYCLOAK_SERVER: <clientUrl>/keycloak
|
||||||
OAUTH_KEYCLOAK_REALM: opendatenschutzcenter
|
OAUTH_KEYCLOAK_REALM: opendatenschutzcenter
|
||||||
MAILER_DSN: ${MAILER_DSN}
|
MAILER_DSN: smtp://null
|
||||||
laF_version: ${GIT_VERSION}
|
laF_version: 3.0.4
|
||||||
registerEmailAdress: ${registerEmailAdress}
|
|
||||||
DEFAULT_EMAIL: ${registerEmailAdress}
|
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.app-odc.tls=true"
|
- "traefik.http.routers.app-odc.tls=true"
|
||||||
- "traefik.http.routers.app-odc.rule=Host(`${PUBLIC_URL}`)"
|
- "traefik.http.routers.app-odc.rule=Host(`<clientUrl>`)"
|
||||||
- "traefik.http.routers.app-odc.entrypoints=web"
|
- "traefik.http.routers.app-odc.entrypoints=web"
|
||||||
- "traefik.http.services.app-odc.loadbalancer.server.port=8080"
|
- "traefik.http.services.app-odc.loadbalancer.server.port=8080"
|
||||||
- "traefik.http.routers.app-odc.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.app-odc.tls.certresolver=letsencrypt"
|
||||||
|
@ -93,7 +80,7 @@ services:
|
||||||
|
|
||||||
db-odc:
|
db-odc:
|
||||||
image: mariadb:latest
|
image: mariadb:latest
|
||||||
hostname: ${RANDOMTAG}db-odc
|
hostname: db-odc
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "mariadb-admin" ,"ping", "-h", "localhost","-ptest" ]
|
test: [ "CMD", "mariadb-admin" ,"ping", "-h", "localhost","-ptest" ]
|
||||||
timeout: 20s
|
timeout: 20s
|
||||||
|
@ -112,14 +99,14 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
KEYCLOAK_ADMIN: admin
|
KEYCLOAK_ADMIN: admin
|
||||||
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PW}
|
KEYCLOAK_ADMIN_PASSWORD: <keycloakAdminPw>
|
||||||
KC_DB: mariadb
|
KC_DB: mariadb
|
||||||
KC_DB_PASSWORD: ${KEYCLOAK_PW}
|
KC_DB_PASSWORD: <keycloak-pw>
|
||||||
KC_DB_URL: jdbc:mariadb://${RANDOMTAG}db-odc:3306/keycloak
|
KC_DB_URL: jdbc:mariadb://db-odc:3306/keycloak
|
||||||
KC_DB_USERNAME: keycloak
|
KC_DB_USERNAME: keycloak
|
||||||
KC_HOSTNAME_URL: ${HTTP_METHOD}://${PUBLIC_URL}/keycloak
|
KC_HOSTNAME_URL: <clientUrl>/keycloak
|
||||||
KC_HOSTNAME_PATH: ${HTTP_METHOD}://${PUBLIC_URL}/keycloak
|
KC_HOSTNAME_PATH: <clientUrl>/keycloak
|
||||||
KC_HOSTNAME_ADMIN_URL: ${HTTP_METHOD}://${PUBLIC_URL}/keycloak
|
KC_HOSTNAME_ADMIN_URL: <clientUrl>/keycloak
|
||||||
KC_HTTP_RELATIVE_PATH: /keycloak
|
KC_HTTP_RELATIVE_PATH: /keycloak
|
||||||
KC_PROXY: passthrough
|
KC_PROXY: passthrough
|
||||||
|
|
||||||
|
@ -129,7 +116,7 @@ services:
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.keycloak-odc.tls=true"
|
- "traefik.http.routers.keycloak-odc.tls=true"
|
||||||
- "traefik.http.routers.keycloak-odc.rule=Host(`${PUBLIC_URL}`) && PathPrefix(`/keycloak`)"
|
- "traefik.http.routers.keycloak-odc.rule=Host(`<clientUrl>`) && PathPrefix(`/keycloak`)"
|
||||||
- "traefik.http.routers.keycloak-odc.entrypoints=web"
|
- "traefik.http.routers.keycloak-odc.entrypoints=web"
|
||||||
- "traefik.http.services.keycloak-odc.loadbalancer.server.port=8080"
|
- "traefik.http.services.keycloak-odc.loadbalancer.server.port=8080"
|
||||||
- "traefik.http.routers.keycloak-odc.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.keycloak-odc.tls.certresolver=letsencrypt"
|
||||||
|
|
10
setup.sh
10
setup.sh
|
@ -50,3 +50,13 @@ echo ------------------------------------------------------------
|
||||||
|
|
||||||
sed -i "s|<open-datenschutzcenter-pw>|$ODC_DB_PW|g" mysql-initdb/init-userdb.sql
|
sed -i "s|<open-datenschutzcenter-pw>|$ODC_DB_PW|g" mysql-initdb/init-userdb.sql
|
||||||
sed -i "s|<keycloak-pw>|$KEYCLOAK_PW|g" mysql-initdb/init-userdb.sql
|
sed -i "s|<keycloak-pw>|$KEYCLOAK_PW|g" mysql-initdb/init-userdb.sql
|
||||||
|
|
||||||
|
echo ------------------------------------------------------------
|
||||||
|
echo ----------------- Build Docker Compose File ----------------
|
||||||
|
echo ------------------------------------------------------------
|
||||||
|
|
||||||
|
sed -i "s|<keycloakAdminPw>|$KEYCLOAK_ADMIN_PW|g" docker-compose.yml
|
||||||
|
sed -i "s|<keycloak-pw>|$KEYCLOAK_PW|g" docker-compose.yml
|
||||||
|
sed -i "s|<clientsecret>|$OAUTH_KEYCLOAK_CLIENT_ID|g" docker-compose.yml
|
||||||
|
sed -i "s|<clientUrl>|$HTTP_METHOD://$PUBLIC_URL|g" docker-compose.yml
|
||||||
|
sed -i "s|<odcMySqlPw>|$ODC_DB_PW|g" docker-compose.yml
|
||||||
|
|
Loading…
Reference in a new issue