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:
9
docker-compose.yml
Normal file → Executable file
9
docker-compose.yml
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user