Serve CMS at root and bootstrap Authentik in compose

This commit is contained in:
DCCONSTRUCTIONS
2026-07-06 10:32:24 +03:00
parent 5004627476
commit 4b4963101a
6 changed files with 72 additions and 29 deletions
+43 -2
View File
@@ -53,8 +53,8 @@ services:
- ../projects:/app/projects
- ${CMS_NODEDC_SITE_PATH:-../../NODEDC_SITE}:/sites/nodedc
depends_on:
authentik-server:
condition: service_started
authentik-bootstrap:
condition: service_completed_successfully
networks:
- cms-edge
@@ -132,6 +132,47 @@ services:
networks:
- cms-edge
authentik-bootstrap:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2026.2.2}
command:
- ak
- shell
- -c
- exec(open('/bootstrap/bootstrap-cms.py', encoding='utf-8').read())
restart: "no"
env_file:
- ${CMS_SERVICE_ENV_FILE:-.env}
environment:
AUTHENTIK_POSTGRESQL__HOST: postgresql-authentik
AUTHENTIK_POSTGRESQL__NAME: ${PG_DB:-authentik}
AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS:?database password required}
AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik}
AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY:?secret key required}
AUTHENTIK_ERROR_REPORTING__ENABLED: ${AUTHENTIK_ERROR_REPORTING__ENABLED:-false}
CMS_AUTH_DOMAIN: ${CMS_AUTH_DOMAIN:-cms-auth.local.nodedc}
CMS_BOOTSTRAP_ADMIN_EMAIL: ${CMS_BOOTSTRAP_ADMIN_EMAIL:-}
CMS_BOOTSTRAP_ADMIN_PASSWORD: ${CMS_BOOTSTRAP_ADMIN_PASSWORD:-}
CMS_BOOTSTRAP_ADMIN_NAME: ${CMS_BOOTSTRAP_ADMIN_NAME:-DCTOUCH CMS Admin}
CMS_BOOTSTRAP_FORCE_PASSWORD: ${CMS_BOOTSTRAP_FORCE_PASSWORD:-false}
CMS_OIDC_CLIENT_ID: ${CMS_OIDC_CLIENT_ID:?cms oidc client id required}
CMS_OIDC_CLIENT_SECRET: ${CMS_OIDC_CLIENT_SECRET:?cms oidc client secret required}
CMS_OIDC_REDIRECT_URI: ${CMS_OIDC_REDIRECT_URI:?cms oidc redirect uri required}
CMS_OIDC_LOGGED_OUT_REDIRECT_URI: ${CMS_OIDC_LOGGED_OUT_REDIRECT_URI:?cms oidc logged out redirect uri required}
CMS_BASE_URL: ${CMS_BASE_URL:?cms base url required}
CMS_LOGOUT_URI: ${CMS_LOGOUT_URI:-}
depends_on:
authentik-server:
condition: service_healthy
authentik-worker:
condition: service_healthy
volumes:
- authentik-data:/data
- authentik-certs:/certs
- ./authentik/custom-templates:/templates:ro
- ./authentik/bootstrap-cms.py:/bootstrap/bootstrap-cms.py:ro
networks:
- cms-edge
networks:
cms-edge: