Update Offline
To update a Docker Compose installation without internet access, you use two machines: the target machine that runs Governor, and a connected machine with internet access and Docker. For a Kubernetes installation, see Update Helm.
Read Before you update first.
Update
Do the steps in this order.
On the target machine: back up
-
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 and images. Copy
docker-compose.ymlto a safe place, with the.envfile if the folder has one. Then save the images Governor runs now.docker compose images, run in the folder with yourdocker-compose.yml, shows their names and tags;<previous-version>below is that tag.docker save -o /path/to/images/synthesized-api_<previous-version>_linux_amd64.tar synthesizedio/synthesized-api:<previous-version> docker save -o /path/to/images/synthesized-front_<previous-version>_linux_amd64.tar synthesizedio/synthesized-front:<previous-version> docker save -o /path/to/images/synthesized-worker_<previous-version>_linux_amd64.tar synthesizedio/synthesized-worker:<previous-version>
On the connected machine: download
-
Get the new release. Download governor-compose-prod.zip and unzip it:
unzip governor-compose-prod_v1.187.0.zip -d /path/to/extract/ -
Pull and save the new images.
<new-version>is the release you move to, for examplev1.187.0.docker pull --platform linux/amd64 synthesizedio/synthesized-api:<new-version> docker pull --platform linux/amd64 synthesizedio/synthesized-front:<new-version> docker pull --platform linux/amd64 synthesizedio/synthesized-worker:<new-version> docker save -o /path/to/images/synthesized-api_<new-version>_linux_amd64.tar synthesizedio/synthesized-api:<new-version> docker save -o /path/to/images/synthesized-front_<new-version>_linux_amd64.tar synthesizedio/synthesized-front:<new-version> docker save -o /path/to/images/synthesized-worker_<new-version>_linux_amd64.tar synthesizedio/synthesized-worker:<new-version> -
Move the files to the target machine: the unzipped release and the three
.tarfiles.
On the target machine: update
-
Load the new images, before you restart. Without internet access, Docker Compose can’t pull missing images.
docker load -i /path/to/images/synthesized-api_<new-version>_linux_amd64.tar docker load -i /path/to/images/synthesized-front_<new-version>_linux_amd64.tar docker load -i /path/to/images/synthesized-worker_<new-version>_linux_amd64.tar -
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.Then run
docker compose config --imagesin that folder. It must list the three images with the<new-version>tag, so that Docker Compose uses the images you loaded.
-
-
Restart:
docker compose down docker compose up -d -
Check the update.
docker compose psshould show the services running and healthy. Sign in, and check your workflows and data sources. If something is wrong, readdocker compose logs.
Roll back
-
Stop Governor with
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. 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 -
Load the previous images you saved in step 2:
docker load -i /path/to/images/synthesized-api_<previous-version>_linux_amd64.tar docker load -i /path/to/images/synthesized-front_<previous-version>_linux_amd64.tar docker load -i /path/to/images/synthesized-worker_<previous-version>_linux_amd64.tar -
Start Governor with
docker compose up -d. -
Check the rollback with
docker compose psanddocker compose logs, then sign in.