Fix Caddy volume mount issue in Portainer
- Remove problematic Caddyfile volume mount that fails in Portainer - Use Caddy's command-line reverse proxy mode instead - This avoids file mounting issues while providing same functionality - Caddy will auto-handle HTTPS/Let's Encrypt for the specified domain - Simpler, more portable configuration for containerized deployments
This commit is contained in:
@@ -112,11 +112,13 @@ services:
|
|||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
|
||||||
- caddy_data:/data
|
- caddy_data:/data
|
||||||
- caddy_config:/config
|
- caddy_config:/config
|
||||||
environment:
|
environment:
|
||||||
DOMAIN: ${DOMAIN:-localhost}
|
DOMAIN: ${DOMAIN:-localhost}
|
||||||
|
# Use Caddy's reverse proxy command without file mounting
|
||||||
|
# This avoids Portainer file mount issues
|
||||||
|
command: caddy reverse-proxy --from "${DOMAIN:-localhost}" --to web:3000
|
||||||
depends_on:
|
depends_on:
|
||||||
- web
|
- web
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user