barycenter/docker-compose.yml
Till Wegmueller c8b27bf196
feat: add deployment configurations for multiple platforms
Add comprehensive deployment support for:
- Docker: Multi-stage Dockerfile with security hardening
- Docker Compose: Production-ready compose file with volume persistence
- Kubernetes: Complete Helm chart with configurable values, ingress, PVC
- Linux: systemd service unit with extensive security hardening
- FreeBSD: rc.d init script with proper daemon management
- illumos/Solaris: SMF manifest with service contract management

Each platform includes:
- Installation scripts/manifests
- Configuration examples
- Management instructions
- Security best practices
- Troubleshooting guides

The Helm chart provides:
- Configurable resources and autoscaling
- Security contexts and pod security
- Health checks (liveness/readiness probes)
- Ingress with TLS support
- Persistent volume claims
- Service account management

All deployments follow security best practices:
- Non-root user execution
- Minimal privileges
- Read-only root filesystems where applicable
- Resource limits
- Network policies

Added DEPLOYMENT.md with comprehensive deployment guide covering
all platforms, configuration options, and production checklist.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:30:46 +01:00

59 lines
1.4 KiB
YAML

version: '3.8'
services:
barycenter:
build:
context: .
dockerfile: Dockerfile
image: barycenter:latest
container_name: barycenter
restart: unless-stopped
ports:
- "8080:8080"
environment:
# Override config via environment variables
# Use CRABIDP__ prefix with double underscores for nested keys
- RUST_LOG=info
# Example: CRABIDP__SERVER__PORT=8080
# Example: CRABIDP__SERVER__PUBLIC_BASE_URL=https://idp.example.com
# Example: CRABIDP__DATABASE__URL=sqlite:///app/data/crabidp.db?mode=rwc
volumes:
# Persist database and keys
- barycenter-data:/app/data
# Optional: override config file
# - ./config.toml:/app/config/config.toml:ro
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/.well-known/openid-configuration"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
# Security options
security_opt:
- no-new-privileges:true
# Read-only root filesystem (except data volume)
read_only: false
# Drop all capabilities and add only required ones
cap_drop:
- ALL
# Resource limits
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
volumes:
barycenter-data:
driver: local