- Add "Backup database" step that copies drsousan.db out of the
running container to /opt/drsousan-backups/ before any container
changes, keeping the last 10 backups
- Replace --force-recreate (broken on this Docker version) with
explicit docker stop + docker rm before docker compose up
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
docker compose up --force-recreate only works when Compose owns the
container. If the container was started outside Compose (e.g. manually
via docker restart), Compose can't recreate it and errors with
"container name already in use". Explicitly stopping and removing it
first handles both cases cleanly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Without this flag, the deploy fails with "container name already in use"
when a container with the same name exists from a previous run.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>