News for hackers. Stuff that matters.
Re:The future of Nginx: Getting back to our open source roots by vbezhenar on Wednesday August 24, 2022 @01:48AM (#32575369)
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.
Re:The future of Nginx: Getting back to our open source roots by hantusk on Wednesday August 24, 2022 @02:51AM (#32575734)
Hm, 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.
Re:The future of Nginx: Getting back to our open source roots by vbezhenar on Wednesday August 24, 2022 @04:57AM (#32576673)
I 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.
Re:The future of Nginx: Getting back to our open source roots by rootsu on Wednesday August 24, 2022 @05:28AM (#32576941)
You can just create the image on some other powerful server and the just pull the final image from the registry.
Re:The future of Nginx: Getting back to our open source roots by jamespo on Wednesday August 24, 2022 @05:06AM (#32576743)
what's the server spec?
Re:The future of Nginx: Getting back to our open source roots by vbezhenar on Wednesday August 24, 2022 @06:14AM (#32577339)
VPS 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.

Re:The future of Nginx: Getting back to our open source roots by zebracanevra on Wednesday August 24, 2022 @10:55AM (#32580254)
Easy 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.

Re:The future of Nginx: Getting back to our open source roots by andrewstuart on Wednesday August 24, 2022 @02:43AM (#32575673)
They 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-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.

Re:The future of Nginx: Getting back to our open source roots by krets on Sunday September 04, 2022 @08:26PM (#32719150)
With this docker image you can just download the binary and add it as a volume!

https://hotio.dev/containers/caddy/

Re:The future of Nginx: Getting back to our open source roots by dizhn on Wednesday August 24, 2022 @03:43AM (#32576052)
You 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.
Re:The future of Nginx: Getting back to our open source roots by mholt on Wednesday August 24, 2022 @09:57AM (#32579522)
We have the caddy add-package command that may be of interest to you!
Re:The future of Nginx: Getting back to our open source roots by vbezhenar on Wednesday August 24, 2022 @03:49AM (#32576094)
I use docker.
Re:The future of Nginx: Getting back to our open source roots by dizhn on Wednesday August 24, 2022 @04:08AM (#32576221)
Some other user explained how you can use caddy to automate it below.