Skip to content

Update / Rollback

Container Lifecycle

Build → Start → Health Check → Update → Rollback → Stop/Remove

The commands below come from the actual scripts and compose file; no command that doesn't match the compose file is included.

Build

docker compose config     # validate configuration
docker compose build      # build images

Start

docker compose up -d

(Recommended: ./install.sh / .\install.ps1 — the script automates .env generation, image build and healthcheck verification.)

Health Check

docker compose ps                          # SERVICE / STATUS / PORTS / HEALTH
curl http://localhost:8080/health
docker compose logs -f                     # follow logs

Update

./update.sh          # Linux
.\update.ps1          # Windows

update.sh order: installation check → version log → configuration backup → git fetch → git pull --ff-only (no merge/rebase is performed) → version/dependency comparison → rebuild the required services (docker compose build) → restart → healthcheck.

  • The update stops if there are uncommitted changes to tracked files.
  • docker compose down -v is never run → the database (mongo_data/mongo_config) is preserved.
  • To reinstall without pulling code: ./update.sh --no-pull.

Rollback

Automatic rollback is disabled by default and is only git-level (there is no separate image-level rollback mechanism):

./update.sh --allow-rollback

With --allow-rollback, if the post-update healthcheck fails and the code changed, the script runs git reset --hard <previous-commit> and rebuilds and restarts the services on that version. Without the flag, the script only suggests this — it does not roll back automatically:

./update.sh --allow-rollback     # or manually:
git reset --hard <previous-commit-sha>
docker compose build
docker compose up -d

Stop / Remove

docker compose down       # stops/removes containers, volumes are PRESERVED

To fully remove the application (stops services, removes containers and application images; MongoDB data, .env, backups/ and the source code are preserved):

./uninstall.sh          # Linux
.\uninstall.ps1         # Windows

For a full cleanup (--purge) and to also delete the database (--purge-data), see the repository root README.md.