3 ms·
One pain point with caddy for me was cloudflare dns validation. I had to rebuild caddy from scratch, build my own container image. This process is slow as hell
by vbezhenar 4y ago
One pain point with caddy for me was cloudflare dns validation. I had to rebuild caddy from scratch, build my own container image. This process is slow as hell and very RAM-intensive, I had to add swap just for it. I wish they publish images with popular plugins built-in.
- deleted 4y ago[deleted]
- andrewstuart 4y agoThey do provide pre built stuff. It's just really unclear on their website that this is exactly what they do. I had the same problem as you. Here is me whining about it on the Caddy frum: https://caddy.community/t/wildcard-certificates-building-from-scratch-and-what-caddy-is-all-about/15793 https://caddy.community/t/wildcard-certificates-building-fro... But in the end I managed to get the pre built stuff. Their download section is extremely unclear about whether or not you need to build Caddy. You don't.
- krets 4y agoWith this docker image you can just download the binary and add it as a volume! https://hotio.dev/containers/caddy/ https://hotio.dev/containers/caddy/
- hantusk 4y agoHm, i found this to be pretty straight forward through Docker: e.g: FROM caddy:2-builder AS builder RUN xcaddy build \ --with github.com/greenpau/caddy-security FROM caddy:2 COPY --from=builder /usr/bin/caddy /usr/bin/caddy You can keep your container image, and just do the "COPY --from=builder" step in there. We do this in CI/CD on every build.
- vbezhenar 4y agoI did something similar. It puts my server to knees and takes something like a hour to complete, requiring all services to stop before I can run it. This is extremely unergonomic for me.
- jamespo 4y agowhat's the server spec?
- vbezhenar 4y agoVPS with 1 core and 512 MB RAM. I just checked, not really a hour, it spent 25 minutes and then failed with "no space left on device". Right now there's 4.9GB free, so it takes at least around 5 GB disk space which is an issue as well. Building on separate computer will work, of course, but it makes everything more complex.
- zebracanevra 4y agoEasy way around that is to use a CI service like GH Actions. Build it there, push it to dockerhub, and you're done. Have it run on a schedule to keep it updated, if necessary. Alternatively, GH Actions allows you to set a manual trigger so you can rebuild whenever.
- rootsu 4y agoYou can just create the image on some other powerful server and the just pull the final image from the registry.
- dizhn 4y agoYou go to the download page. Click the checkbox for cloudflare dns and hit download. The binary you download will have the module built in. It's very simple but of course being nonstandard it makes updates unnecessarily painful. It would be nice if you could wget it with a special hash that represents the modules you need or something like that.