Skip to main content
id: docker-upgrade title: Docker Upgrade Upgrade strategy for Docker deployments. Follow a backup → upgrade → smoke test workflow.

Step 0 — Backup first

  • Backup MySQL: docker exec mysql sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD" > /tmp/all.sql' then docker cp to host or stream to object storage.
  • Backup uploads volume (rsync or tar).

Step 1 — Pull new image


docker compose pull sitecopilot

Step 2 — Run migrations & restart

Some images run migrations on startup. Use rolling restart:

docker compose up -d sitecopilot

# or for zero-downtime if you run multiple replicas behind a proxy

docker compose up -d --scale sitecopilot=2 sitecopilot

Step 3 — Smoke tests

  • Check logs: docker compose logs sitecopilot for migration success.
  • Call health endpoint (if available): curl -I https://docs.example.com/health.
  • Browse the admin UI and a few pages.

Rollback

  • If upgrade fails, stop new container and start the previous image tag:

docker compose pull sitecopilot:previous-tag

docker compose up -d

# restore DB from dump if necessary