Skip to content

Deployment

kittendevv edited this page Apr 27, 2026 · 7 revisions

This page outlines how you can set up a reverse proxy, deploy the backend and frontend separated and how you can set up demo mode should you wish to do so.

Running backend and frontend separately

In version 2.0.0 deployment was simplified by building the backend and frontend into a single image. This makes deployment easier. If for some reason you want to deploy them as separate images you can continue using the old docker-compose.yml file, separate images of new versions for the backend and frontend are still being built.

docker-compose.yml separate backend + frontend
name: invio

services:
  backend:
    image: ghcr.io/kittendevv/invio-backend:latest
    env_file:
      - .env
    environment:
      ADMIN_USER: ${ADMIN_USER}
      ADMIN_PASS: ${ADMIN_PASS}
      JWT_SECRET: ${JWT_SECRET}
      DATABASE_PATH: ${DATABASE_PATH:-/app/data/invio.db}
    volumes:
      - invio_data:/app/data
    ports:
      - "${BACKEND_PORT:-3000}:3000"
    restart: unless-stopped

  frontend:
    image: ghcr.io/kittendevv/invio-frontend:latest
    env_file:
      - .env
    environment:
      PORT: ${FRONTEND_PORT_INTERNAL:-8000}
      BACKEND_URL: ${BACKEND_URL:-http://backend:3000}
    depends_on:
      - backend
    ports:
      - "${FRONTEND_PORT:-8000}:${FRONTEND_PORT_INTERNAL:-8000}"
    restart: unless-stopped

volumes:
  invio_data:
    driver: local

Reverse Proxy Configuration

When running Invio behind a reverse proxy, set RATE_LIMIT_TRUST_PROXY=true and configure your proxy to forward the client IP:

nginx
location / {
    proxy_pass http://localhost:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}
Apache
<VirtualHost *:443>
    ProxyPreserveHost On
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

    RequestHeader set X-Real-IP "%{REMOTE_ADDR}s"
    RequestHeader set X-Forwarded-For "%{REMOTE_ADDR}s"
    RequestHeader set X-Forwarded-Proto "https"
</VirtualHost>

Requires: mod_proxy, mod_proxy_http, mod_headers

Caddy
invio.example.com {
    reverse_proxy localhost:3000 {
        header_up X-Real-IP {remote_host}
        header_up X-Forwarded-For {remote_host}
        header_up X-Forwarded-Proto {scheme}
    }
}

Note: Caddy automatically sets X-Forwarded-For by default.

Demo mode

Set DEMO_MODE=true to enable demo mode, this resets the database of the app every set time period to a clean copy

  • DEMO_DB_PATH — path to a pristine database file mounted into the container
  • DATABASE_PATH — active DB file (default /app/data/invio.db)
  • DEMO_RESET_HOURS — interval (default 3)
  • DEMO_RESET_ON_START — perform a reset at startup (default true)

To mount a DEMO_DB into the container add a new volume to your compose file

volumes:
  - ./path/to/your.db:/app/data/invio-demo.db

Clone this wiki locally