Upgrading
Before you upgrade
Section titled “Before you upgrade”- Read the changelog for the target version — check
CHANGELOG.mdor the release notes for breaking changes and migration notes. - Back up PostgreSQL. Valkey state is ephemeral (broker + cache); PostgreSQL is the only stateful service.
Terminal window pg_dump -U trueppm trueppm > trueppm-backup-$(date +%F).sql# Or via Docker:docker exec trueppm-db-1 pg_dump -U trueppm trueppm \> trueppm-backup-$(date +%F).sql - Note your current version before starting.
Terminal window docker inspect ghcr.io/trueppm/api:latest --format '{{.Config.Labels}}'# Or: helm list -n trueppm
Docker Compose (development)
Section titled “Docker Compose (development)”git pull origin maindocker compose pulldocker compose up -dMigrations run automatically when the api container starts.
Single-server with Docker Compose
Section titled “Single-server with Docker Compose”cd /opt/trueppmgit pull origin main
# Update the target version in .env:# APP_VERSION=0.2.0
docker compose -f docker-compose.prod.yml pulldocker compose -f docker-compose.prod.yml up -dThe api-init service runs migrate --noinput before the API starts. Watch it complete:
docker compose -f docker-compose.prod.yml logs -f api-init# Should end with: "0 unapplied migration(s)." or a list of applied migrations.Helm / Kubernetes
Section titled “Helm / Kubernetes”helm upgrade trueppm oci://ghcr.io/trueppm/charts/trueppm \ --version 0.2.0 \ --namespace trueppm \ -f my-values.yamlMigrations run in a Kubernetes Job before the new Deployment rolls out. Check status:
kubectl get jobs -n trueppmkubectl logs -n trueppm job/trueppm-migrateRollback
Section titled “Rollback”Docker Compose rollback
Section titled “Docker Compose rollback”# Restore the previous APP_VERSION in .env, then:docker compose -f docker-compose.prod.yml pulldocker compose -f docker-compose.prod.yml up -dIf the migration applied schema changes, restore from the pre-upgrade backup:
docker compose -f docker-compose.prod.yml downdocker volume rm trueppm_postgres_datadocker compose -f docker-compose.prod.yml up db -ddocker exec -i trueppm-db-1 psql -U trueppm trueppm < trueppm-backup-<date>.sql# Then bring up the full stack at the previous version.Helm rollback
Section titled “Helm rollback”helm rollback trueppm -n trueppmThis restores the previous chart revision. If the migration applied schema changes, restore from backup and trigger a fresh migrate run.
Post-upgrade verification
Section titled “Post-upgrade verification”# Check all containers are healthydocker compose -f docker-compose.prod.yml ps# orkubectl get pods -n trueppm
# Hit the health endpointcurl https://trueppm.example.com/api/v1/health/
# Confirm the expected version is runningcurl https://trueppm.example.com/api/v1/health/ | python3 -m json.toolCommon issues
Section titled “Common issues”Migrations fail on startup
Check that DATABASE_URL is correct and the database is reachable. Run migrations manually to see the full traceback:
docker compose -f docker-compose.prod.yml exec api python manage.py migrate --noinputStatic files not updating
Trigger a collectstatic run:
docker compose -f docker-compose.prod.yml exec api python manage.py collectstatic --noinput --clearWebSocket connections drop after upgrade
Expected — clients reconnect automatically within a few seconds. The Channels layer (Valkey) is not drained between upgrades; in-flight messages are lost but clients recover via the reconnect loop.