Or, you could just use the official docker image for Caddy instead of running it on your host machine, it’ll work more similarly to how you had it before.
True. I really dislike docker, but if there are no other ways. I only used docker here, because i didnt found a working solution for seafile-arm without docker.
At the end, I got it working, and don’t want to miss adding my solution for a kind stranger who stumble over this thread.
- I added this to my docker-compose.yaml instead of the Swag part:
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- $PWD/Caddyfile:/etc/caddy/Caddyfile
- media:/shared/media
- ./seafile/seahub-data:/shared/seahub-data
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:
media:
-
I purged caddy from repo and remove /etc/caddy/Caddyfile
-
Added a new Caddyfile in the same folder where the compose.yaml is.
-
Used this conf (same as above but I had to set the 127.0.0.1 to “seafile” because thats what docker used for the mapping.
my.domain {
handle /seafhttp* {
reverse_proxy seafile:8082
}
handle_path /media* {
root * /shared/media
file_server
}
handle {
reverse_proxy seafile:8000
}
}
- docker-compose up -d and it works flawless.
Thx. For pointing me to this solution @francislavoie, finally I have caddy running on all my servers. This was the last one.