Files
Anubis/docker-compose.yml
T
Alby96andClaude Opus 5.5 f9d71559e8
ci / test (postgres) (push) Successful in 2m22s
ci / test (sqlite) (push) Failing after 2m27s
ci / image (push) Skipped
feat(server): web server, interface shell, demo mode and Docker image (refs #11 #12 #13 #14 #15 #16 #17)
Phase 1 completed on top of the library foundations:
- Server: startup state machine (config, first run, database down, schema,
  identity, ready) with an error page that retries by itself; the configured
  database is the only one ever opened, and a vanished SQLite file is never
  recreated. REST API and status WebSocket; session cookie auth, CSRF on
  every form and write call; desktop and demo answer only the computer itself.
- Interface: static Blazor rendering with plain forms (no interactive
  runtime), menu, top bar and phone bottom bar as in the mockups, light and
  dark themes with appendix C tokens and a contrast test, Panoramica, Diario,
  Rischio, Impostazioni; service pages for sign-in, first access, desktop
  first run and the database error page with its choices.
- Demo mode (tasks seed-demo): appendix F in a database of its own under the
  temp folder, frozen clock, never touches the configured installation.
- Docker: entrypoint gives /data to PUID:PGID and drops root with setpriv,
  HEALTHCHECK through bash /dev/tcp; proven with SQLite, PostgreSQL, a wrong
  configuration and a database that goes away and comes back.
- tasks screenshots drives the installed Edge/Chrome through DevTools for
  exact 1440 and 390 pixel shots; anubis db export|import on the command line.

Fixes from the independent review: return paths without control characters,
Host check against DNS rebinding, attempt limit counted before the check and
also on the error-page password, one-use TOTP codes and a code to switch the
second factor off, error-page choices serialized with the startup loop,
identity checked before migrating, restore restarts with "Ferma tutto" on,
damaged archives reported instead of crashing. Running the server tests on
PostgreSQL exposed pages rendered before their data arrived; data-loading
components now load first (LoadedComponent).

Decisions in ADR 0007. Tests: 100 on SQLite and on PostgreSQL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:40:15 +01:00

49 lines
1.5 KiB
YAML

# Development only (SPEC 3): the app plus a local PostgreSQL. Never used in production.
# Start: docker compose up --build Health: curl http://localhost:8787/health
# First access at http://localhost:8787 with ANUBIS_ADMIN_PASSWORD, then choose a new password.
services:
anubis:
build:
context: .
dockerfile: deploy/docker/Dockerfile
image: gitea.encke-hake.ts.net/balbosoft/anubis:dev
ports:
- "8787:8787"
environment:
ANUBIS_DB_ENGINE: postgres
ANUBIS_DB_HOST: postgres
ANUBIS_DB_PORT: "5432"
ANUBIS_DB_NAME: anubis
ANUBIS_DB_USER: anubis
ANUBIS_DB_PASSWORD: ${ANUBIS_DB_PASSWORD:-anubis-dev}
# Development values only: a real installation chooses its own (deploy/unraid/anubis.xml).
ANUBIS_SECRET_KEY: ${ANUBIS_SECRET_KEY:-dev-only-secret-key-change-me-0123456789}
ANUBIS_ADMIN_PASSWORD: ${ANUBIS_ADMIN_PASSWORD:-dev-only-change-me}
ANUBIS_ALLOW_LIVE: "0"
TZ: Europe/Rome
volumes:
- anubis-data:/data
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18
environment:
POSTGRES_DB: anubis
POSTGRES_USER: anubis
POSTGRES_PASSWORD: ${ANUBIS_DB_PASSWORD:-anubis-dev}
ports:
- "127.0.0.1:55432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U anubis -d anubis"]
interval: 3s
timeout: 3s
retries: 20
volumes:
- postgres-data:/var/lib/postgresql
volumes:
anubis-data:
postgres-data: