# ── Production deployment example ───────────────────────────────────────────── # # Uses the pre-built image from your private registry. # Copy this file to your server and run: # # docker compose -f docker-compose.prod.yml up -d # # Prerequisites on the host: # - Create the directories listed under "volumes" (or adjust paths in .env) # - Populate config/config.json (see README for the JSON schema) # OR leave it empty and the Setup Wizard will create it on first access. # # ── Directory layout this file expects ──────────────────────────────────────── # # /opt/archivum/ (or whatever ARCHIVUM_BASE points to) # ├── config/ # │ └── config.json ← backend configuration (auto-created by wizard) # ├── wiki/ ← AsciiDoc source files (git repo lives here) # └── db/ # └── archivum.db ← SQLite database (auto-created on first start) # # ── Quick start ──────────────────────────────────────────────────────────────── # cp .env.example .env # edit to match your environment # mkdir -p /opt/archivum/{config,wiki,db} # docker compose -f docker-compose.prod.yml pull # docker compose -f docker-compose.prod.yml up -d # ────────────────────────────────────────────────────────────────────────────── services: archivum: image: ${REGISTRY:-192.168.0.19:5000}/archivum:${IMAGE_TAG:-latest} container_name: archivum restart: unless-stopped ports: - "${HOST_PORT:-8080}:4000" environment: # Path inside the container where config.json is looked up. DOCKER_PATH: /config # Path inside the container where the Vue SPA is served from. # Change only if you override the Dockerfile. UI_DIR: /srv/archivum/ui # Match the UID/GID of the user that owns the host directories. PUID: ${PUID:-1000} PGID: ${PGID:-1000} # Optional: set TZ for correct git commit timestamps. TZ: ${TZ:-Europe/Stockholm} volumes: # ── Configuration ────────────────────────────────────────────────────── # config.json (backend) and settings.json (frontend) live here. # The Setup Wizard writes config.json here on first run. - ${ARCHIVUM_CONFIG:-/opt/archivum/config}:/config # ── Wiki files (AsciiDoc source + git repo) ──────────────────────────── # This directory becomes the git repository root. # Map it to wherever you want the .adoc files to live on the host. - ${ARCHIVUM_WIKI:-/opt/archivum/wiki}:/data/wiki # ── SQLite database ──────────────────────────────────────────────────── # Mounting the db directory separately makes it easy to back up the # database independently of the wiki content. - ${ARCHIVUM_DB:-/opt/archivum/db}:/data/db # Optional: limit resource usage on a Raspberry Pi 5. # deploy: # resources: # limits: # cpus: "2.0" # memory: 512M healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:4000/health"] interval: 30s timeout: 5s retries: 3 start_period: 10s