nixberg / caddy

Snap of the Caddy web server
4 stars 2 forks source link

snap is outdated #2

Closed popey closed 3 years ago

popey commented 4 years ago

Thanks for making the caddy snap. The version in the store is very outdated. Do you plan to update it? If not, would you mind handing it over to someone who will?

mholt commented 4 years ago

I would also like to see a maintained snap. We are willing to maintain an official one.

nixberg commented 4 years ago

To set the record straight, I’ve rebuilt the snap whenever there was a new version of caddy or go, the edge channel was always up to date. That one release on stable was unintentional, I’ve removed it now.

That said, I'd be happy to pass the baton to @mholt!

mholt commented 4 years ago

We'd be happy to adopt it, I just don't know how to do it. Any way we can gradually bring it in as an official distribution? https://github.com/caddyserver/dist

popey commented 4 years ago

@nixberg apologies if I came over as brash. Not my intention. I do appreciate the work you've done so far, so thank you.

If you do wish to hand the snap over the steps are as follows:

Happy to help at any stage.

mholt commented 4 years ago

Great, thank you! I or another maintainer will revisit this as soon as possible (we're a bit swamped right now). Would either of you like to become maintainers of the official snap? If so, I can invite you to our development Slack to help coordinate.

nixberg commented 4 years ago

I'd rather hand over maintainership, tbh.


As for building the snap, the straightforward thing would be a copy of this repo (say, caddyserver/caddy-snap) connected to build.snapcraft.io. The release process would then look something like this:

It should be possible to integrate this snap into caddyserver/dist if desired.


Snaps also do runtime management; some changes will be necessary there.

The snap as is specifies a single caddy service, which makes a fine reverse proxy and is likely what many users expect from a caddy snap. However, since services run as isolated root, things get a bit ugly when you want some kind of /var/www. The natural but not at all obvious location for that would be $SNAP_COMMON (I think) but since there’s no group support yet (?), everything in there has to be owned by root, which ends up being pretty annoying. I expect @popey knows more about this issue.

One might want to run more than one service instance. I'm not sure whether snaps support that use case or ever will.

So, the snap should probably offer a non-daemon caddy command, to be run as user or via systemd. That should be simple enough but there might yet be issues with the sandboxing.

Caddy 2 might require some adjustments, too.

nixberg commented 4 years ago

Caddy 2 might require some adjustments, too.

The snap builds Caddy 2 now.

So, the snap should probably offer a non-daemon caddy command

Done.

mholt commented 4 years ago

Thank you @nixberg!

I'll ask our dist team if anyone wants to adopt this snap.