Comment on Caddy reverse proxy
WubbyGeth@lemmy.world 2 weeks ago
Here is my YAMLD YAML haha
version: ‘3.3’ networks: caddy: services: portainer: image: portainer/portainer-ce:latest container_name: portainer2 restart: unless-stopped security_opt: - no-new-privileges:true volumes: - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock:ro - /home/Joe/containers/portainer/portainer-data:/data networks: - caddy ports: - 9000:9000
caddy: image: caddy:latest restart: unless-stopped container_name: caddy ports: - 80:80 - 443:443 volumes: - /home/Joe/container/caddy/Caddyfile:/etc/caddy/Caddyfile - /home/Joe/container/caddy/site:/srv - /home/Joe/container/caddy/caddy_data:/data - /home/Joe/container/caddy/caddy_config:/config networks: - caddy volumes: caddy_data:
HelloRoot@lemy.lol 2 weeks ago
The error suggests that you’re trying to mount a file (
Caddyfile
) onto a directory or vice versa. Let’s debug this step by step.Steps to Fix:
Check if the path exists and is correct Run:
ls -ld /home/Joe/container/caddy/Caddyfile
touch /home/Joe/container/caddy/Caddyfile
Ensure correct permissions
chmod 644 /home/Joe/container/caddy/Caddyfile
Check YAML Formatting
Your
docker-compose.yml
seems to have incorrect indentation and improper quotes aroundversion
. Here’s a fixed version:Restart Docker and Try Again
If the error persists, check
docker logs caddy
for additional hints.