Fix HTTPS configuration: use service hostname for networking and add HTTP-only compose file
- Updated service name from 'digiserver' to 'digiserver-app' in docker-compose.yml for proper Docker network DNS resolution - Fixed Caddyfile to reference correct service hostname 'digiserver-app:5000' - Changed port mapping from 'ports' to 'expose' for internal-only access - Added docker-compose.http.yml for HTTP-only deployment on port 80 (development/testing) - Both Flask app and Caddy now communicate correctly over internal Docker network - App now accessible at https://localhost or https://your-domain.com on port 443
This commit is contained in:
4
Caddyfile
Normal file → Executable file
4
Caddyfile
Normal file → Executable file
@@ -9,7 +9,7 @@
|
||||
# Automatic HTTPS (Caddy handles Let's Encrypt automatically)
|
||||
|
||||
# Reverse proxy to Flask app
|
||||
reverse_proxy digiserver:5000 {
|
||||
reverse_proxy digiserver-app:5000 {
|
||||
header_up Host {host}
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-For {remote_host}
|
||||
@@ -44,7 +44,7 @@
|
||||
# Handle IP address access without automatic HTTPS
|
||||
http://192.168.0.206 {
|
||||
# Reverse proxy to Flask app
|
||||
reverse_proxy digiserver:5000 {
|
||||
reverse_proxy digiserver-app:5000 {
|
||||
# Headers
|
||||
header_up Host {host}
|
||||
header_up X-Real-IP {remote_host}
|
||||
|
||||
Reference in New Issue
Block a user