Compare commits

...

5 Commits

Author SHA1 Message Date
b311cadc4c chore: publish 4.0.0+2023.10.5 release 2023-12-21 19:49:05 +01:00
d01c539c4f add container depedencies 2023-12-18 08:50:37 +01:00
427644df38 increase default timeout 2023-12-07 16:32:39 +01:00
f4172f2a64 chore: publish 3.3.1+2023.8.5 release 2023-11-22 21:36:27 +01:00
126b50d4bd chore: publish 3.3.0+2023.8.5 release 2023-11-22 19:41:48 +01:00
5 changed files with 70 additions and 7 deletions

View File

@ -1,5 +1,5 @@
TYPE=authentik
TIMEOUT=300
TIMEOUT=900
ENABLE_AUTO_UPDATE=true
# POST_DEPLOY_CMDS="worker set_admin_pass|worker apply_blueprints|worker add_applications"
LETS_ENCRYPT_ENV=production

View File

@ -11,6 +11,7 @@ export MATRIX_CONFIG_VERSION=v1
export WEKAN_CONFIG_VERSION=v3
export VIKUNJA_CONFIG_VERSION=v1
export MONITORING_CONFIG_VERSION=v1
export DB_ENTRYPOINT_VERSION=v1
customize() {
if [ -z "$1" ]

View File

@ -32,8 +32,11 @@ x-env: &env
version: '3.8'
services:
app:
image: ghcr.io/goauthentik/server:2023.6.1
image: ghcr.io/goauthentik/server:2023.10.5
command: server
depends_on:
- db
- redis
secrets:
- db_password
- admin_pass
@ -73,12 +76,15 @@ services:
- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.http.middlewares.${STACK_NAME}-frameOptions.headers.contentSecurityPolicy=frame-ancestors ${X_FRAME_OPTIONS_ALLOW_FROM}"
- "coop-cloud.${STACK_NAME}.version=3.2.4+2023.6.1"
- "coop-cloud.${STACK_NAME}.version=4.0.0+2023.10.5"
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
worker:
image: ghcr.io/goauthentik/server:2023.6.1
image: ghcr.io/goauthentik/server:2023.10.5
command: worker
depends_on:
- db
- redis
secrets:
- db_password
- admin_pass
@ -109,9 +115,15 @@ services:
environment: *env
db:
image: postgres:12.15-alpine
image: postgres:15.5
secrets:
- db_password
configs:
- source: db_entrypoint
target: /docker-entrypoint.sh
mode: 0555
entrypoint:
/docker-entrypoint.sh
volumes:
- database:/var/lib/postgresql/data
networks:
@ -134,11 +146,11 @@ services:
backupbot.backup.path: "/var/lib/postgresql/data"
redis:
image: redis:7.0.12-alpine
image: redis:7.2.3-alpine
networks:
- internal
healthcheck:
test: ["CMD", "redis-cli","ping"]
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 30s
timeout: 10s
retries: 10
@ -202,3 +214,7 @@ configs:
name: ${STACK_NAME}_system_tenant_${SYSTEM_TENANT_VERSION}
file: system_tenant.yaml.tmpl
template_driver: golang
db_entrypoint:
name: ${STACK_NAME}_db_entrypoint_${DB_ENTRYPOINT_VERSION}
file: entrypoint.postgres.sh.tmpl
template_driver: golang

View File

@ -0,0 +1,45 @@
#!/bin/bash
set -e
MIGRATION_MARKER=$PGDATA/migration_in_progress
OLDDATA=$PGDATA/old_data
NEWDATA=$PGDATA/new_data
if [ -e $MIGRATION_MARKER ]; then
echo "FATAL: migration was started but did not complete in a previous run. manual recovery necessary"
exit 1
fi
if [ -f $PGDATA/PG_VERSION ]; then
DATA_VERSION=$(cat $PGDATA/PG_VERSION)
if [ -n "$DATA_VERSION" -a "$PG_MAJOR" != "$DATA_VERSION" ]; then
echo "postgres data version $DATA_VERSION found, but need $PG_MAJOR. Starting migration"
echo "Installing postgres $DATA_VERSION"
sed -i "s/$/ $DATA_VERSION/" /etc/apt/sources.list.d/pgdg.list
apt-get update && apt-get install -y --no-install-recommends \
postgresql-$DATA_VERSION \
&& rm -rf /var/lib/apt/lists/*
echo "shuffling around"
chown -R postgres:postgres $PGDATA
gosu postgres mkdir $OLDDATA $NEWDATA
chmod 700 $OLDDATA $NEWDATA
mv $PGDATA/* $OLDDATA/ || true
touch $MIGRATION_MARKER
echo "running initdb"
# abuse entrypoint script for initdb by making server error out
gosu postgres bash -c "export PGDATA=$NEWDATA ; /usr/local/bin/docker-entrypoint.sh --invalid-arg || true"
echo "running pg_upgrade"
cd /tmp
gosu postgres pg_upgrade --link -b /usr/lib/postgresql/$DATA_VERSION/bin -d $OLDDATA -D $NEWDATA -U $POSTGRES_USER
cp $OLDDATA/pg_hba.conf $NEWDATA/
mv $NEWDATA/* $PGDATA
rm -rf $OLDDATA
rmdir $NEWDATA
rm $MIGRATION_MARKER
echo "migration complete"
fi
fi
/usr/local/bin/docker-entrypoint.sh postgres

1
release/4.0.0+2023.10.5 Normal file
View File

@ -0,0 +1 @@
It is only possible to upgrade to 2023.10 from 2023.8, you need to update to 2023.8.x before applying this update