new file: Dockerfile
new file: README.md new file: docker-compose.yml new file: nginx/templates/default.conf.template
This commit is contained in:
57
nginx/templates/default.conf.template
Normal file
57
nginx/templates/default.conf.template
Normal file
@@ -0,0 +1,57 @@
|
||||
# Reverse Proxy für Bluemap (http://devanturas.net:8100 -> https://map.devanturas.net)
|
||||
# Konfiguration als Template: Der offizielle nginx-Container ersetzt die
|
||||
# ${VAR}-Platzhalter automatisch per envsubst mit den Umgebungsvariablen
|
||||
# aus docker-compose.yml.
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name map.devanturas.net;
|
||||
|
||||
# --- Iframe-Einbettung über HTTPS erlauben ---
|
||||
# CSP frame-ancestors legt fest, WELCHE Seiten die Karte einbetten dürfen.
|
||||
# "${FRAME_ANCESTORS}" wird durch die Umgebungsvariable ersetzt.
|
||||
# Achtung nginx-Image: Leere envsubst-Mengen. Daher hier vorsichtig setzen.
|
||||
add_header Content-Security-Policy "frame-ancestors https://* http://*; upgrade-insecure-requests" always;
|
||||
add_header X-Frame-Options "ALLOWALL" always;
|
||||
|
||||
# Puffer für große Bluemap-Responses
|
||||
client_max_body_size "${CLIENT_MAX_BODY_SIZE}";
|
||||
|
||||
# --- WebSocket / HTTP-Proxy zu Bluemap ---
|
||||
location / {
|
||||
proxy_pass http://"${UPSTREAM_HOST}":"${UPSTREAM_PORT}";
|
||||
|
||||
# HTTP/1.1 + Upgrade-Header notwendig für WebSockets (Live-Karten-Updates)
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# Lange laufende WebSocket-Verbindungen nicht abbrechen
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 3600s;
|
||||
proxy_read_timeout 3600s;
|
||||
|
||||
# Puffergrößen für Streaming (Bluemap sendet große Datenblöcke)
|
||||
proxy_buffering off;
|
||||
proxy_buffer_size 128k;
|
||||
proxy_buffers 4 256k;
|
||||
proxy_busy_buffers_size 256k;
|
||||
}
|
||||
|
||||
# Healthcheck-Endpunkt für Coolify (erwartet 200)
|
||||
location = /health {
|
||||
access_log off;
|
||||
return 200 "ok\n";
|
||||
add_header Content-Type text/plain;
|
||||
}
|
||||
|
||||
# Komprimierung (reduziert Bandbreite)
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss image/svg+xml;
|
||||
gzip_min_length 1024;
|
||||
}
|
||||
Reference in New Issue
Block a user