Step 0 — Backup first
-
Backup MySQL:
docker exec mysql sh -c 'exec mysqldump --all-databases -uroot -p"$MYSQL_ROOT_PASSWORD" > /tmp/all.sql'thendocker cpto host or stream to object storage. - Backup uploads volume (rsync or tar).
Step 1 — Pull new image
Step 2 — Run migrations & restart
Some images run migrations on startup. Use rolling restart:Step 3 — Smoke tests
-
Check logs:
docker compose logs sitecopilotfor 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: