This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/050_deployment_operations/updating_tdk/update_dc.md. For the complete documentation index, see llms.txt.

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

  1. 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
  2. Save the current configuration. Copy docker-compose.yml to a safe place, with the .env file if the folder has one. You need them to roll back.

  3. Get the new release. Download governor-compose-prod.zip and unzip it:

    unzip governor-compose-prod_v1.187.0.zip -d /path/to/extract/
  4. Carry your settings over. Replace docker-compose.yml with the new one, and set your values in it again:

    • SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME and SPRING_DATASOURCE_PASSWORD;

    • JWT_SECRET and CREDENTIALS_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.

  5. Pull the new images and restart:

    docker compose pull
    docker compose down
    docker compose up -d
  6. Check the update. docker compose ps should show the services running and healthy. Sign in, and check that your workflows and data sources are there. If something is wrong, read docker compose logs.

Roll back

  1. Stop Governor:

    docker compose down
  2. Restore the configuration. Put back the docker-compose.yml, and the .env file, that you saved in step 2. This also restores the previous image tags.

  3. 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 apiuser isn’t, run dropdb and createdb as 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-error stops at the first error, so a failed restore doesn’t go unnoticed.

  4. Start Governor:

    docker compose up -d
  5. Check the rollback with docker compose ps and docker compose logs, then sign in.

Troubleshooting

  • Read the logs of all services with docker compose logs, or of one service with docker compose logs <service-name>, for example backend.

  • If backend doesn’t become healthy after the update, check the database settings you carried over.