"feat: Integrate Caddy as reverse proxy for frontend"

This commit is contained in:
Till Tomczak 2025-05-26 07:58:09 +02:00
parent 0e40ad1c12
commit bb10247c41
3 changed files with 8 additions and 8 deletions

View File

@ -36,7 +36,7 @@ SESSION_LIFETIME = timedelta(days=7)
SSL_ENABLED = True
SSL_CERT_PATH = "/opt/myp/ssl/myp.crt"
SSL_KEY_PATH = "/opt/myp/ssl/myp.key"
SSL_HOSTNAME = "raaspberry"
SSL_HOSTNAME = "raspberrypi"
# Scheduler-Konfiguration
SCHEDULER_INTERVAL = 60 # Sekunden

View File

@ -8,7 +8,7 @@ services:
dockerfile: Dockerfile
container_name: myp-backend
restart: unless-stopped
hostname: raaspberry
hostname: raspberrypi
ports:
- "80:80" # HTTP Fallback
- "443:443" # HTTPS
@ -23,7 +23,7 @@ services:
- FLASK_APP=app/app.py
- FLASK_ENV=production
- SSL_ENABLED=true
- SSL_HOSTNAME=raaspberry
- SSL_HOSTNAME=raspberrypi
healthcheck:
test: ["CMD", "curl", "-k", "https://localhost:443/health"]
interval: 30s
@ -40,8 +40,8 @@ services:
restart: unless-stopped
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=https://raaspberry:443
- NEXT_PUBLIC_BACKEND_HOST=raaspberry:443
- NEXT_PUBLIC_API_URL=https://raspberrypi:443
- NEXT_PUBLIC_BACKEND_HOST=raspberrypi:443
volumes:
- ./frontend:/app
- /app/node_modules
@ -74,7 +74,7 @@ services:
- myp-network
extra_hosts:
- "host.docker.internal:host-gateway"
- "raaspberry:backend"
- "raspberrypi:backend"
- "m040tbaraspi001.de040.corpintra.net:127.0.0.1"
environment:
- CADDY_HOST=m040tbaraspi001.de040.corpintra.net

View File

@ -16,7 +16,7 @@ m040tbaraspi001.de040.corpintra.net {
}
handle @api {
uri strip_prefix /api
reverse_proxy raaspberry:443 {
reverse_proxy raspberrypi:443 {
transport http {
tls
tls_insecure_skip_verify
@ -62,7 +62,7 @@ localhost, 127.0.0.1 {
}
handle @api {
uri strip_prefix /api
reverse_proxy raaspberry:443 {
reverse_proxy raspberrypi:443 {
transport http {
tls
tls_insecure_skip_verify