Update Docker Compose
Update a Docker Compose installation by backing up the metadata database, replacing docker-compose.yml with the new release’s, and restarting. If the server has no internet access, follow Update Offline instead.
Read Before you update first.
Update
-
Back up the metadata database. Do this before anything else.
pg_dump -U apiuser -h localhost -F c -b -v -f /path/to/backup/db-backup.full.dump governor -
Save the current configuration. Copy
docker-compose.ymlto a safe place, with the.envfile if the folder has one. You need them to roll back. -
Get the new release. Download governor-compose-prod.zip and unzip it:
unzip governor-compose-prod_v1.187.0.zip -d /path/to/extract/ -
Carry your settings over. Replace
docker-compose.ymlwith the new one, and set your values in it again:-
SPRING_DATASOURCE_URL,SPRING_DATASOURCE_USERNAMEandSPRING_DATASOURCE_PASSWORD; -
JWT_SECRETandCREDENTIALS_ENCRYPTION_KEY, unchanged; -
ADMIN_EMAIL,SYNTHESIZED_KEY, and any other settings and volumes you added, such as SSO.Compare the old and the new file to find them.
-
-
Pull the new images and restart:
docker compose pull docker compose down docker compose up -d -
Check the update.
docker compose psshould show the services running and healthy. Sign in, and check that your workflows and data sources are there. If something is wrong, readdocker compose logs.
Roll back
-
Stop Governor:
docker compose down -
Restore the configuration. Put back the
docker-compose.yml, and the.envfile, that you saved in step 2. This also restores the previous image tags. -
Restore the database from the backup. Always do this: the previous release must run on the database as it was before the update. Drop and recreate the database, then restore it. The PostgreSQL user must be allowed to drop and create databases; if
apiuserisn’t, rundropdbandcreatedbas a superuser.dropdb -U apiuser -h localhost governor createdb -U apiuser -h localhost -O apiuser governor pg_restore --exit-on-error -U apiuser -h localhost -d governor /path/to/backup/db-backup.full.dump--exit-on-errorstops at the first error, so a failed restore doesn’t go unnoticed. -
Start Governor:
docker compose up -d -
Check the rollback with
docker compose psanddocker compose logs, then sign in.
Troubleshooting
-
Read the logs of all services with
docker compose logs, or of one service withdocker compose logs <service-name>, for examplebackend. -
If
backenddoesn’t become healthy after the update, check the database settings you carried over.