Skip to content

Deployment

This page shows a simple, reliable way to run Invio in production with Docker Compose. Copy the snippet, set your env, and you’re good to go.

  • Docker and Docker Compose
  • Backend image with Deno 2.x and wkhtmltopdf installed
NameDescription
ADMIN_USERAdmin username for Basic Auth.
ADMIN_PASSAdmin password for Basic Auth.
JWT_SECRETSecret used for optional JWT issuance.
DATABASE_PATHSQLite path inside the container (e.g., /app/data/invio.db).
BACKEND_URLFrontend→Backend base URL (e.g., http://backend:3000).
  • Keep the backend service name as backend (or update BACKEND_URL).
  • Expose backend on port 3000 and frontend (Fresh) on 8000.
  • Mount volumes for the SQLite DB and backend/data/templates.
  • Add a simple healthcheck hitting /health.
services:
backend:
image: your/deno-backend:latest # includes wkhtmltopdf
env_file: .env
ports: ["3000:3000"]
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3000/health"]
interval: 30s
timeout: 5s
retries: 3
volumes:
- invio_data:/app/data
- invio_templates:/app/backend/data/templates
frontend:
image: your/fresh-frontend:latest
env_file: .env
ports: ["8000:8000"]
depends_on: [backend]
volumes:
invio_data: {}
invio_templates: {}
  • Persist the SQLite database at DATABASE_PATH
  • Persist template assets at backend/data/templates
  • Use strong ADMIN_USER/ADMIN_PASS values; keep .env private.
  • If frontend and backend run separately, expose only what’s needed.
  • Enable automated backups of volumes.
  • Open /health on the backend and confirm { status: "ok" }.
  • Log in to the frontend and create a test invoice.
  • Download a PDF to verify wkhtmltopdf is available.