diff --git a/lifecycle/container/compose.yml b/lifecycle/container/compose.yml index 4868c98bcc..90dd865713 100644 --- a/lifecycle/container/compose.yml +++ b/lifecycle/container/compose.yml @@ -31,7 +31,7 @@ services: AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY:?secret key required} - image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2026.2.2-rc2} + image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2026.2.1} ports: - ${COMPOSE_PORT_HTTP:-9000}:9000 - ${COMPOSE_PORT_HTTPS:-9443}:9443 @@ -53,7 +53,7 @@ services: AUTHENTIK_POSTGRESQL__PASSWORD: ${PG_PASS} AUTHENTIK_POSTGRESQL__USER: ${PG_USER:-authentik} AUTHENTIK_SECRET_KEY: ${AUTHENTIK_SECRET_KEY:?secret key required} - image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2026.2.2-rc2} + image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2026.2.1} restart: unless-stopped shm_size: 512mb user: root diff --git a/scripts/generate_compose.py b/scripts/generate_compose.py index c29ca50f9d..134752c37e 100755 --- a/scripts/generate_compose.py +++ b/scripts/generate_compose.py @@ -1,12 +1,21 @@ #!/usr/bin/env python3 +from packaging.version import parse from yaml import safe_dump from authentik import authentik_version -authentik_image = ( - f"${{AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}}:${{AUTHENTIK_TAG:-{authentik_version()}}}" -) +version = authentik_version() +version_parsed = parse(version) +version_split = version_parsed.base_version.split(".") +# If this is an rc version for a patch release (i.e. 2026.2.2-rc1), then don't include that in the +# compose, and fallback to the previous released patch version +if version_parsed.is_prerelease and version_split[-1] != "0": + previous_patch = int(version_split[-1]) - 1 + version_split[-1] = str(previous_patch) + version = ".".join(version_split) + +authentik_image = f"${{AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}}:${{AUTHENTIK_TAG:-{version}}}" base = { "services": {