Enable Caddy reverse proxy with automatic HTTPS on port 443
This commit is contained in:
@@ -4,8 +4,9 @@ services:
|
|||||||
digiserver:
|
digiserver:
|
||||||
build: .
|
build: .
|
||||||
container_name: digiserver-v2
|
container_name: digiserver-v2
|
||||||
|
# Don't expose directly; use Caddy reverse proxy instead
|
||||||
ports:
|
ports:
|
||||||
- "8080:5000" # Expose for nginx reverse proxy
|
- "5000" # Internal only, accessed via Caddy
|
||||||
volumes:
|
volumes:
|
||||||
- ./instance:/app/instance
|
- ./instance:/app/instance
|
||||||
- ./app/static/uploads:/app/app/static/uploads
|
- ./app/static/uploads:/app/app/static/uploads
|
||||||
@@ -21,37 +22,34 @@ services:
|
|||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 40s
|
start_period: 40s
|
||||||
# Commented out network when using external nginx proxy
|
networks:
|
||||||
# networks:
|
- digiserver-network
|
||||||
# - digiserver-network
|
|
||||||
|
|
||||||
# Caddy reverse proxy (commented out when using external nginx)
|
# Caddy reverse proxy with automatic HTTPS
|
||||||
# Uncomment the section below if you want standalone deployment with automatic HTTPS
|
caddy:
|
||||||
# caddy:
|
image: caddy:2-alpine
|
||||||
# image: caddy:2-alpine
|
container_name: digiserver-caddy
|
||||||
# container_name: digiserver-caddy
|
ports:
|
||||||
# ports:
|
- "80:80"
|
||||||
# - "80:80"
|
- "443:443"
|
||||||
# - "443:443"
|
- "443:443/udp" # HTTP/3 support
|
||||||
# - "443:443/udp" # HTTP/3
|
volumes:
|
||||||
# volumes:
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||||
# - ./Caddyfile:/etc/caddy/Caddyfile:ro
|
- caddy-data:/data
|
||||||
# - caddy-data:/data
|
- caddy-config:/config
|
||||||
# - caddy-config:/config
|
environment:
|
||||||
# environment:
|
- DOMAIN=${DOMAIN:-localhost}
|
||||||
# - DOMAIN=${DOMAIN:-localhost}
|
- EMAIL=${EMAIL:-admin@localhost}
|
||||||
# - EMAIL=${EMAIL:-admin@localhost}
|
depends_on:
|
||||||
# depends_on:
|
- digiserver
|
||||||
# - digiserver
|
restart: unless-stopped
|
||||||
# restart: unless-stopped
|
networks:
|
||||||
# networks:
|
- digiserver-network
|
||||||
# - digiserver-network
|
|
||||||
|
|
||||||
# Commented out when using external nginx proxy
|
networks:
|
||||||
# networks:
|
digiserver-network:
|
||||||
# digiserver-network:
|
driver: bridge
|
||||||
# driver: bridge
|
|
||||||
|
|
||||||
# volumes:
|
volumes:
|
||||||
# caddy-data:
|
caddy-data:
|
||||||
# caddy-config:
|
caddy-config:
|
||||||
|
|||||||
Reference in New Issue
Block a user