chore: update .gitignore to include .env.example and enhance deployment documentation with Caddy reverse proxy setup
This commit is contained in:
61
docker-compose.caddy.yml
Normal file
61
docker-compose.caddy.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
# Docker Compose Konfiguration für Caddy Reverse Proxy
|
||||
# Optional: Nur in Produktionsumgebung verwenden
|
||||
#
|
||||
# Starten: docker compose -f docker-compose.yml -f docker-compose.caddy.yml up -d
|
||||
# Stoppen: docker compose -f docker-compose.yml -f docker-compose.caddy.yml down
|
||||
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
caddy:
|
||||
# Verwende Custom-Image mit GoDaddy DNS-Plugin
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.caddy
|
||||
# Alternativ: Verwende Standard-Caddy und manuelle DNS-Konfiguration
|
||||
# image: caddy:2-alpine
|
||||
container_name: hoerdle-caddy
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# Standard HTTP/HTTPS Ports
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
- "443:443/udp" # Für HTTP/3 (QUIC)
|
||||
environment:
|
||||
# GoDaddy API-Credentials für DNS-01 Challenge
|
||||
# Diese müssen in einer .env-Datei gesetzt werden:
|
||||
# GODADDY_API_KEY=your_api_key
|
||||
# GODADDY_API_SECRET=your_api_secret
|
||||
- GODADDY_API_KEY=${GODADDY_API_KEY:-}
|
||||
- GODADDY_API_SECRET=${GODADDY_API_SECRET:-}
|
||||
# Optional: Email für Let's Encrypt Benachrichtigungen
|
||||
- CADDY_EMAIL=${CADDY_EMAIL:-}
|
||||
volumes:
|
||||
# Caddyfile-Konfiguration
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
# Persistente Zertifikat-Speicherung
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
networks:
|
||||
- default
|
||||
# Health Check
|
||||
healthcheck:
|
||||
test: ["CMD", "caddy", "version"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
# Nur starten, wenn ENABLE_CADDY=true gesetzt ist
|
||||
profiles:
|
||||
- production
|
||||
|
||||
volumes:
|
||||
caddy_data:
|
||||
driver: local
|
||||
caddy_config:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
default:
|
||||
# Netzwerk wird automatisch erstellt wenn beide Compose-Dateien zusammen verwendet werden
|
||||
# Bei separater Verwendung: docker network create hoerdle_default und external: true setzen
|
||||
|
||||
Reference in New Issue
Block a user