final-cleanup: Produktionsfertige Konfiguration - Alle Ports auf 443 vereinheitlicht, TLS-Zertifikate vorgeneriert, Zentraler Installer erstellt

This commit is contained in:
2025-05-26 22:16:22 +02:00
parent 7aa70cf976
commit f719f74195
40 changed files with 598 additions and 11815 deletions

View File

@@ -1,62 +1,49 @@
version: '3'
version: '3.8'
services:
# Next.js Frontend
frontend:
frontend-app:
build:
context: .
dockerfile: Dockerfile
container_name: myp-frontend
restart: unless-stopped
container_name: myp-frontend-app
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=https://raspberrypi:443
- NEXT_PUBLIC_BACKEND_HOST=raspberrypi:443
- PORT=80
volumes:
- ./certs:/app/certs
ports:
- "80"
- NEXT_PUBLIC_API_URL=https://raspberrypi
- HOSTNAME=m040tbaraspi001.de040.corpintra.net
networks:
- myp-network
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:80/health"]
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Caddy Proxy für SSL-Terminierung
caddy:
image: caddy:2.7-alpine
image: caddy:2-alpine
container_name: myp-caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- ./certs:/etc/caddy/certs
- ./certs:/etc/ssl/certs/myp
- caddy_data:/data
- caddy_config:/config
networks:
- myp-network
depends_on:
- frontend
extra_hosts:
- "host.docker.internal:host-gateway"
- "raspberrypi:192.168.0.105"
- "m040tbaraspi001.de040.corpintra.net:127.0.0.1"
- frontend-app
restart: unless-stopped
environment:
- CADDY_HOST=m040tbaraspi001.de040.corpintra.net
- CADDY_DOMAIN=m040tbaraspi001.de040.corpintra.net
cap_add:
- NET_ADMIN
networks:
myp-network:
driver: bridge
- CADDY_INGRESS_NETWORKS=myp-network
volumes:
caddy_data:
caddy_config:
caddy_config:
networks:
myp-network:
driver: bridge