feat(deploy): merge Phase 5a deployment configuration

Complete containerized deployment system with Docker/Podman support.

Key features:
- Multi-stage Dockerfile with Python 3.11-slim base
- Docker Compose configurations for production and development
- Nginx reverse proxy with security headers and rate limiting
- Systemd service units for Docker, Podman, and docker-compose
- Backup/restore scripts with integrity verification
- Podman compatibility (ADR-009)

All tests pass including Podman verification testing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-21 19:16:54 -07:00
parent d3c3e8dc6b
commit 01dcaba86b
22 changed files with 6353 additions and 18 deletions

View File

@@ -0,0 +1,68 @@
# Gondulf IndieAuth Server - systemd Unit for Compose (Podman or Docker)
#
# This unit works with both podman-compose and docker-compose
#
# Installation (Podman rootless):
# 1. Copy this file to ~/.config/systemd/user/gondulf.service
# 2. Edit ExecStart/ExecStop to use podman-compose
# 3. systemctl --user daemon-reload
# 4. systemctl --user enable --now gondulf
# 5. loginctl enable-linger $USER
#
# Installation (Docker):
# 1. Copy this file to /etc/systemd/system/gondulf.service
# 2. Edit ExecStart/ExecStop to use docker-compose
# 3. Edit Requires= and After= to include docker.service
# 4. sudo systemctl daemon-reload
# 5. sudo systemctl enable --now gondulf
#
# Management:
# systemctl --user status gondulf # For rootless
# sudo systemctl status gondulf # For rootful/Docker
#
[Unit]
Description=Gondulf IndieAuth Server (Compose)
Documentation=https://github.com/yourusername/gondulf
After=network-online.target
Wants=network-online.target
# For Docker, add:
# Requires=docker.service
# After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutStartSec=300
TimeoutStopSec=60
# Working directory (adjust to your installation path)
# Rootless Podman: WorkingDirectory=/home/%u/gondulf
# Docker: WorkingDirectory=/opt/gondulf
WorkingDirectory=/home/%u/gondulf
# Start services (choose one based on your container engine)
# For Podman (rootless):
ExecStart=/usr/bin/podman-compose -f docker-compose.yml -f docker-compose.production.yml up -d
# For Docker (rootful):
# ExecStart=/usr/bin/docker-compose -f docker-compose.yml -f docker-compose.production.yml up -d
# Stop services (choose one based on your container engine)
# For Podman:
ExecStop=/usr/bin/podman-compose down
# For Docker:
# ExecStop=/usr/bin/docker-compose down
Restart=on-failure
RestartSec=30s
[Install]
# For rootless Podman:
WantedBy=default.target
# For Docker:
# WantedBy=multi-user.target