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:
31
Caddyfile
Normal file
31
Caddyfile
Normal 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}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user