You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.2 KiB
64 lines
2.2 KiB
version: '3.8' |
|
|
|
# Production Docker Compose configuration for GitCitadel Online |
|
# Domain: https://gitcitadel.imwald.eu |
|
# |
|
# This configuration: |
|
# - Installs gc-parser from git.imwald.eu (with GitHub fallback) |
|
# - Sets up production networking and resource limits |
|
# - Includes Traefik labels for reverse proxy (optional - remove if not using Traefik) |
|
# - Configures health checks and automatic restarts |
|
|
|
services: |
|
gitcitadel-online: |
|
build: |
|
context: . |
|
dockerfile: Dockerfile |
|
container_name: gitcitadel-online-prod |
|
restart: unless-stopped |
|
ports: |
|
# Expose port 2323 for Apache reverse proxy (maps to container port 8080) |
|
- "2323:8080" |
|
volumes: |
|
# Mount config file (create from config.yaml.example) |
|
- ./config.yaml:/app/config.yaml:ro |
|
# Persist cache directory |
|
- ./cache:/app/cache |
|
# Ensure scripts directory is available |
|
- ./scripts:/app/scripts:ro |
|
environment: |
|
# Production environment variables |
|
- CONFIG_PATH=/app/config.yaml |
|
- LOG_LEVEL=info |
|
# Link base URL for production domain |
|
- LINK_BASE_URL=https://gitcitadel.imwald.eu |
|
networks: |
|
- gitcitadel-network |
|
healthcheck: |
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/health"] |
|
interval: 30s |
|
timeout: 10s |
|
retries: 3 |
|
start_period: 40s |
|
deploy: |
|
resources: |
|
limits: |
|
cpus: '2' |
|
memory: 1G |
|
# Note: reservations are only supported in Docker Swarm mode |
|
# For regular docker-compose, only limits are supported |
|
# Traefik labels for reverse proxy (optional - remove if not using Traefik) |
|
# If using nginx or another reverse proxy, remove these labels and configure |
|
# your reverse proxy to forward requests to localhost:2323 |
|
labels: |
|
- "traefik.enable=true" |
|
- "traefik.http.routers.gitcitadel.rule=Host(`gitcitadel.imwald.eu`)" |
|
- "traefik.http.routers.gitcitadel.entrypoints=websecure" |
|
- "traefik.http.routers.gitcitadel.tls.certresolver=letsencrypt" |
|
- "traefik.http.services.gitcitadel.loadbalancer.server.port=8080" |
|
- "traefik.docker.network=gitcitadel-network" |
|
|
|
networks: |
|
gitcitadel-network: |
|
driver: bridge |
|
name: gitcitadel-network
|
|
|