3 ms·
These days I see no point in installing services on a VPS directly, other than docker + docker-compose. You could do it in one image with the reverse proxy + st
by andrewzah 6y ago
These days I see no point in installing services on a VPS directly, other than docker + docker-compose. You could do it in one image with the reverse proxy + static files, or break it out into two images (this is helpful if you run more services on the VPS).
As for updates, caddy v1 used to support pulling in from git, but I don't think that got ported to v2. So what I do is build+push a docker image, and have a cron job on my vps to pull+restart my website's container.
My preferences go Traefik > Caddy > Nginx, but traefik definitely has a bit of a learning curve.
https://github.com/andrewzah/andrewzah-com-source/blob/master/Dockerfile https://github.com/andrewzah/andrewzah-com-source/blob/maste...
https://github.com/andrewzah/andrewzah.com-docker/tree/master/services/http https://github.com/andrewzah/andrewzah.com-docker/tree/maste...
- oftenwrong 6y agoYou might be interested in: https://github.com/containrrr/watchtower https://github.com/containrrr/watchtower It would automatically pull the new image and restart your containers.
- Tepix 6y agoLet's see the description for traefik: The simplest, most comprehensive cloud-native stack to help enterprises manage their entire network across data centers, on-premises servers and public clouds all the way out to the edge. Sounds ideal for a personal blog! /s
- andrewzah 6y agoIf you already know Traefik, it is much nicer to work with than a static proxy as it automatically updates routes as you launch containers. Is it overkill for only 1 service- a small blog? Yes. In my particular case, I run ~5 services on that VPS (used to be ~13), and I run about ~30 containers on my home server for https://zah.rocks https://zah.rocks. Having to manually update caddy or nginx and restart every time I added a dns entry would be a huge pain. In addition, Traefik's middlewares made it relatively simple to add in SSO with External Auth Server/Authelia + Keycloak/OpenLDAP/LDAP Account Manager (LAM).