Add Caddy server configuration for domain markov.elpatron.me with Let's Encrypt SSL and WebSocket support. Includes: - Caddy service in docker-compose.yml - Caddyfile with SSL and WebSocket configuration - Enhanced Flask app for proxy compatibility - Documentation files (CADDY.md, updated README.md)

This commit is contained in:
2025-08-25 20:28:41 +00:00
parent 70bde3c015
commit b016d83c2f
5 changed files with 194 additions and 6 deletions

31
Caddyfile Normal file
View File

@@ -0,0 +1,31 @@
markov.elpatron.me {
# Use Let's Encrypt for SSL certificates
elpatron@mailbox.org
# Proxy all requests to the Flask application
reverse_proxy markov-economics:5000 {
# WebSocket support
header_up Upgrade {header.Upgrade}
header_up Connection {header.Connection}
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
# Handle WebSocket upgrade requests specifically
@websockets {
header Connection *Upgrade*
header Upgrade websocket
}
reverse_proxy @websockets markov-economics:5000 {
# Ensure WebSocket headers are properly forwarded
header_up Upgrade {header.Upgrade}
header_up Connection {header.Connection}
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
}