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:
Quality App Developer
2026-01-13 15:20:25 +02:00
parent fc4c8a7474
commit ef17abfe6b
3 changed files with 34 additions and 6 deletions

9
docker-compose.yml Normal file → Executable file
View File

@@ -1,12 +1,12 @@
#version: '3.8'
services:
digiserver:
digiserver-app:
build: .
container_name: digiserver-v2
# Don't expose directly; use Caddy reverse proxy instead
ports:
- "5000" # Internal only, accessed via Caddy
expose:
- "5000"
volumes:
- ./instance:/app/instance
- ./app/static/uploads:/app/app/static/uploads
@@ -41,7 +41,8 @@ services:
- DOMAIN=${DOMAIN:-localhost}
- EMAIL=${EMAIL:-admin@localhost}
depends_on:
- digiserver
digiserver-app:
condition: service_started
restart: unless-stopped
networks:
- digiserver-network