HUB
Sign inSign up

alwaysju2418/minizentrale

By alwaysju2418

•Updated 2 days ago

Minizentrale is a lite Managementsystem for altar server. See on https://minizentrale.net

Image
Content management system
Monitoring & observability
0

290

alwaysju2418/minizentrale repository overview

⁠Minizentrale

An open-source management system for altar servers (Ministranten) in parishes and church communities.

Minizentrale helps parishes organize their altar server groups: schedules, attendance, group meetings, communication, and service swaps, all in one place for chief altar servers, group leaders, parents, and the servers themselves.

Status: Early development. Features and APIs may change.

⁠Features

  • Role-based access for Obermessdiener:innen, group leaders, ceremoniar:innen, parish staff, parents, and altar servers
  • Master data for altar servers and groups; parent-child account links
  • Service types, role slots, schedule management, “Meine Dienste”, and PDF export
  • Absence reporting with private reason, 48-hour friend requests, and service exchange board
  • News feed with optional email, polls, private feedback, and vacation schedules
  • Group meeting protocols and attendance
  • Sacristy attendance check-in with single-use QR tokens and live status refresh
  • PDF schedule import with preview and manual name matching; image-only OCR is not included
  • Django admin for user accounts, roles, groups, roster data, and management records

⁠Requirements

  • Python 3.11+
  • Node.js 18+ (frontend tests)
  • WeasyPrint system libraries (Pango, HarfBuzz, Cairo, GDK-Pixbuf, GLib, and libffi; installed by the Docker image and CI)
  • Optional Docker Compose and PostgreSQL

⁠Local setup

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

By default, runserver keeps the normal CSRF and origin checks. For local frontend development only, you can opt into a temporary, loopback-only CORS/CSRF-origin compatibility mode with:

python manage.py runserver --developer-mode

The command warns and requires typing YES; any other answer cancels startup. Developer mode only accepts loopback origins (localhost, 127.0.0.1, ::1), refuses non-loopback bind addresses, and still requires valid CSRF tokens. It is not enabled by environment configuration and does not affect normal runserver, production workers, or other management commands. Restart normally without the flag to return to the default secure mode.

Use /admin/ to create profile roles, groups, altar servers, service types, service roles, and schedules. Initial service types and roles are created automatically after migrations. To create clearly fictional example data, run python manage.py seed_demo; its demo credentials are printed by the command and must not be used in production.

Run python3 scripts/init.py from the repository checkout on a host with Docker Engine and the Compose v2 plugin for the interactive first-install flow. The installer requires an explicit digest-pinned image for production Compose; local tags are development-only. It creates a private .env, pulls the selected image, starts the Compose stack, applies database migrations through the web container and prompts for the initial superuser account. The script does not install Docker, configure DNS/firewall/HTTPS reverse proxy, or make the instance production-ready by itself. It refuses to overwrite an existing .env; use it only for a fresh installation. Keep this checkout and its Git history private; .env contains production credentials and must remain mode 0600.

The VERSION file contains the application version (1.1.0 in this checkout). The new alpha app image alpha-v1.3 has been published to Docker Hub (docker.io/alwaysju2418/minizentrale), Codeberg (codeberg.org/alwaysju2418/minizentrale-minimgt) and Codefloe (codefloe.com/minizentrale/core). It contains the Crow CI fixes and Alpine musl and pkgconf fixes; a Trivy scan found no OS or Python package vulnerabilities at publication time. To download the normal application container (not a rescue image), run:

docker pull docker.io/alwaysju2418/minizentrale:alpha-v1.3
# Or pull the same alpha build from Codeberg or Codefloe:
# docker pull codeberg.org/alwaysju2418/minizentrale-minimgt:alpha-v1.3
# docker pull codefloe.com/minizentrale/core:alpha-v1.3

The alpha-v1.3 tag is an evaluation build, not a Cosign-signed stable release and not approved for the secure production updater. For normal deployment, use the Compose setup below. For production, use only an official Codeberg stable image pinned by verified digest; the interactive initializer requires that format. See docs/secure-updates.md⁠ for production trust and update requirements. Future publications must use a new incremented tag and never overwrite a published version tag. Optional stable-release checks are disabled by default; set UPDATE_CHECK_ENABLED=1 in .env, run python manage.py migrate, enable the Software-Update-Einstellungen switch in Django Admin, then schedule python manage.py check_updates (for example daily via cron). A superuser can also trigger an explicit check from the admin update-status page. Checks only read public Codeberg release metadata and never install software. An experimental secure-updater profile, host agent, and explicit superuser approval flow are implemented, but are not production-approved: configure and review the host integration and pass the isolated restore/deployment drills before enabling it. Until then, use the operator-run deployment procedure. The architecture, setup requirements, and outstanding security gates are documented in docs/secure-updates.md⁠ and ops/README.md⁠.

Run the full backend/frontend suite with ./scripts/test.sh (Python/Django and JavaScript tests). Include browser tests with RUN_PLAYWRIGHT=1 ./scripts/test.sh; first run npm install and npx playwright install --with-deps chromium. Or invoke npm run test:e2e separately. Playwright tests use an isolated temporary SQLite database and fictional data, covering module screens, representative workflows, roles/feature switches, Django Admin lists/details, QR check-in and installation guardrails. These tests do not perform production Docker/HTTPS deployment or contact real SMTP/OIDC/CalDAV providers. The same suites run in Crow and as the Forgejo release gate. Schedule the deadline command at least hourly to process unanswered friend requests:

0 * * * * cd /app && python manage.py process_deadlines
# Optional, only if CALDAV_SYNC_ENABLED=1 and the CalDAV feature module is enabled:
13 * * * * cd /app && python manage.py sync_caldav
# Optional, only if UPDATE_CHECK_ENABLED=1 and SoftwareUpdateSettings is enabled:
17 4 * * * cd /app && python manage.py check_updates

⁠Docker and secure deployment

The Compose stack runs Gunicorn as an unprivileged user, binds the application only to localhost, and requires a PostgreSQL password. Put a reverse proxy with valid HTTPS/TLS in front of it; expose port 8000 publicly only through that proxy. Keep PostgreSQL and Redis on the private Compose network and do not publish their ports.

Local development: build the application image with docker build --build-arg MINIZENTRALE_VERSION=$(cat VERSION) --build-arg MINIZENTRALE_REVISION=$(git rev-parse HEAD) -t minizentrale:local ., or use docker compose up --build with development-only configuration. Compose uses MINIZENTRALE_IMAGE (default minizentrale:local) for the app and updater. The Dockerfile is Alpine-based, upgrades Alpine packages during build, installs updated runtime dependencies, and removes pip after installing requirements. Local images are not signed releases and are not suitable for the restricted updater.

Try the published alpha container: use MINIZENTRALE_IMAGE=docker.io/alwaysju2418/minizentrale:alpha-v1.3 in .env and run docker compose pull web && docker compose up -d. The same alpha image is mirrored at codeberg.org/alwaysju2418/minizentrale-minimgt:alpha-v1.3 and codefloe.com/minizentrale/core:alpha-v1.3. These are evaluation tags only, not production releases.

Production/fresh installation: use only an approved signed, stable Codeberg image pinned by digest. Set MINIZENTRALE_IMAGE=codeberg.org/alwaysJu2418/minizentrale-minimgt@sha256:<verified-digest>, MINIZENTRALE_IMAGE_DIGEST=sha256:<same-digest>, and its matching version in the private .env; then run docker compose pull web followed by docker compose up -d. The interactive python3 scripts/init.py flow pulls the digest-pinned image after you provide it. Do not build locally, use an alpha tag, or substitute a mutable tag for a production digest. Before deployment, create .env from .env.example and set unique values for DJANGO_SECRET_KEY (at least 50 characters), FIELD_ENCRYPTION_KEY (valid Fernet key, backed up separately), DJANGO_ALLOWED_HOSTS, POSTGRES_PASSWORD and REDIS_PASSWORD (at least 32 varied characters each), EMAIL_HOST, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD, PUBLIC_BASE_URL, and REDIS_URL. In production, REDIS_URL must be TLS-enabled for a remote Redis server; SECURE_PROXY_SSL_HEADER_TRUSTED=1 and SECURE_PROXY_SSL_HEADER_TRUSTED_CONFIRM=I_TRUST_THE_PROXY may only be set when the reverse proxy overwrites X-Forwarded-Proto and direct access to Gunicorn is blocked. If login throttling should distinguish clients behind the proxy, set TRUSTED_PROXY_IPS to the proxy's exact IP/CIDR ranges and have it overwrite (not append to) X-Forwarded-For; without this, Django safely throttles by the direct peer address. CalDAV sync exports service changes after local commits (remote failures are logged without rolling back local changes). To import parish-calendar edits to events originally created by Minizentrale, run python manage.py sync_caldav --dry-run to preview and python manage.py sync_caldav to apply them; schedule the latter periodically (for example hourly) if timely updates are needed. Import matches the stable event UID, updates only start time, location and notes, and never creates services from unknown calendar events. Review conflicts and backups before enabling a schedule; the integration does not provide bidirectional conflict resolution or sync roster assignments. Configure CALDAV_SYNC_ENABLED=1, the CalDAV endpoint/collection, and credentials in .env; collection and resource requests must stay on the same origin, and production endpoints must use HTTPS. Keep DJANGO_DEBUG=0; production startup intentionally fails when required secure settings are missing. Database TLS defaults to disable only for the private Compose PostgreSQL service (db); use certificate validation for an external database.

Back up PostgreSQL and uploaded files to encrypted, access-controlled storage and regularly test restore procedures. Rotate all credentials and secrets, restrict administrator accounts, apply OS/container updates, and monitor security logs. Docker configuration alone does not set up public HTTPS, backups, a firewall, or a legally sufficient privacy program.

Selected sensitive text fields (absence reasons, feedback subject/body, and meeting protocols) are encrypted in the database using authenticated Fernet encryption. Production requires a separate FIELD_ENCRYPTION_KEY; generate it with python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())". Keep it in a secret manager or a separately protected secret file, not in PostgreSQL or alongside database backups. Back it up securely: if it is lost, those values cannot be recovered. The application must have the key while running, so this protects database dumps and storage copies, not against compromise of a live application/server. Migrations encrypt existing records; arrange a maintenance window and backup before applying them. A migration rollback decrypts these fields back to plaintext; do not downgrade without first planning how the plaintext DB will be protected. The key currently has no automatic rotation support: changing it makes existing ciphertext unreadable, so keep it unchanged across restarts and restores. In local development without an explicit encryption key, a deterministic development key is derived from DJANGO_SECRET_KEY; do not use that mechanism for production. This is not end-to-end encryption.

⁠Configuration

Settings are read from .env and environment variables. SMTP must use TLS/SSL; if SMTP is not configured in development, email is written to the console. HTTPS, secure cookies, HSTS, clickjacking/MIME protections, content security headers, short sessions, no-store responses, and shared-cache login throttling are enabled or required for production.

⁠Privacy and operation

Each instance is intended for one parish. Operators remain responsible for consent, data minimization, retention/deletion policy, backups, access reviews, TLS, mail recipient policy, and validation under applicable data protection law. Use fictional demo data only; do not commit real personal data. The project has not been load-validated for 50–100 users.

⁠License

Apache License 2.0. See LICENSE⁠ and NOTICE⁠.

Tag summary

Content type

Image

Digest

sha256:afd420ab0…

Size

103.3 MB

Last updated

2 days ago

docker pull alwaysju2418/minizentrale:alpha-v1.4