Skip to Content
Ranlanka CRM documentation — pre-release, subject to change.
FeaturesDeployment & CI/CDOverview

Deployment & CI/CD

How the API is built, shipped, and run in production — from the container image through to the VPS it actually runs on.

Container image

A multi-stage Docker build produces a single portable API image, running as a non-root user, with uploaded documents on a mounted volume.

Local stack

docker-compose.yml orchestrates the API alongside Postgres with a named data volume — one command brings both up, with database migrations applying automatically on API startup. All secrets (database password, JWT secret, mail credentials) are externalized via environment variables, never baked into the image.

Pre-commit / pre-push checks

  • Pre-commit — runs the backend test suite. The test suite is fully database-free (every test is a plain unit test with no live Spring context), so this runs offline and fast.
  • Pre-push — runs a full build as a sanity check.

Scheduled jobs

Two daily cron jobs run in-process (no external scheduler needed):

  • Reminder scheduler, 08:00 — sends visa-expiry, flight-today, and recurring-bill reminder emails.
  • Quote cleanup, 03:00 — soft-deletes draft quotes past their 3-day expiry, since the expiry filter alone (applied on every read) hides expired rows from the UI but never actually removes them from the database.

Both jobs are stateless across restarts — a redeploy never causes a duplicate or missed run, since the cron schedule is fixed in code and all actual state (dedup logs, settings) lives in the database.

For the actual VPS provisioning, CI/CD pipeline, HTTPS setup, logging, and backup configuration, see the pages linked above.

Last updated on