Updates and maintenance
Day-to-day commands, updating to a new version and rolling back.
Day to day
cd deploy
docker compose ps # service status
docker compose logs -f --tail=100 web # application logs (worker, migrate, caddy the same way)
curl -fsS https://<domain>/api/health # {"status":"ok","version":"…"}
docker compose restart web # restart the applicationAny change to .env is applied with docker compose up -d: it recreates the services that changed.
Update to a new version
- Step 1Make a one-off database backup — see Backups.
- Step 2Put the new image tag into
deploy/.env:LOOMARK_IMAGE=…:<new version>. With thelatesttag skip this step. - Step 3Run
docker compose pullanddocker compose up -din thedeployfolder. - Step 4The
migrateservice applies new migrations;webandworkerstart only after it succeeds. - Step 5Check
/api/health: theversionfield shows the new version.
Rolling back
Put the previous tag back and run docker compose up -d. If the new version has already applied migrations, roll back together with the database by restoring the backup from step 1.
Security
- Only Caddy (80/443) is open; the database, PostgREST, MinIO and the application stay in the internal network.
deploy/.envhas permissions 600 and holds every key of the installation. Do not commit or forward it.- The application runs as an unprivileged user; the code in the image is read-only.
- Keep the OS and Docker updated; we update the Loomark image, including its base Node image.