# Hoard server, single-node deployment. # # Usage: # cd deploy/docker # docker compose up -d # start # docker compose logs -f # follow logs # docker compose exec server hoard-admin user create alice --password 'SECRET' # docker compose down # stop (volumes preserved) # # Mount your own config.toml under ./config/ to avoid the auto-bootstrap. services: server: # Prebuilt multi-arch image (amd64/arm64) published to GHCR on every # release tag, `docker compose pull && docker compose up -d` to update. # Pin a version (…/hoard:1.0) instead of :latest for reproducible upgrades. image: ghcr.io/rleeon/hoard:latest # To build from source instead of pulling, uncomment `build:` below (it # overrides the pull), the context is the repo root so the workspace # resolves. # build: # context: ../.. # dockerfile: deploy/docker/Dockerfile container_name: hoard-server restart: unless-stopped ports: - "${HOARD_PORT:-12421}:12421" environment: # Override TOML keys without rebuilding/remounting: # HOARD__SERVER__PORT must stay 12421 inside the container, change the # host-side mapping above instead. HOARD__LOGGING__LEVEL: ${HOARD_LOG_LEVEL:-info} HOARD__LOGGING__FORMAT: ${HOARD_LOG_FORMAT:-json} # Set both on a FIRST start and the server creates that admin and prints # a device token in the log, instead of you running `hoard-admin` by hand. # Ignored once the database has users. HOARD_ADMIN_USERNAME: ${HOARD_ADMIN_USERNAME:-} HOARD_ADMIN_PASSWORD: ${HOARD_ADMIN_PASSWORD:-} # The user the server runs as. The entrypoint starts as root only to take # ownership of the volumes below and then drops to this. Set `user:` on # the service instead and it never runs as root at all. PUID: ${HOARD_PUID:-10001} PGID: ${HOARD_PGID:-10001} volumes: # Persistent data (SQLite DB, snapshots, tmp, trash). - hoard-data:/var/lib/hoard # Your config.toml. Left empty, the container writes a working one here on # first start, so it is mounted read-write, not read-only. - ./config:/etc/hoard healthcheck: # Compose-side healthcheck (the Dockerfile one is intentionally shallow). # Uses wget which we install via a tiny addition below; if you'd rather # not, comment this out and rely on Docker's TCP-restart fallback. test: ["CMD-SHELL", "wget -qO- http://localhost:12421/v1/health || exit 1"] interval: 30s timeout: 5s retries: 3 start_period: 10s volumes: hoard-data: name: hoard-data