Self-Hosting Dozens of Web Applications and Services on a Single Server
1–10 of 285 posts
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#2Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#3We do something similar, multiple django sites and static sites on a single digital ocean droplet. We use docker for everything though, and have a single nginx listening on 80/443 that routes traffic to the sites by domain. Each site has a separate pg db and everything is glued together / configured / deployed via ansible.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#4I went the opposite direction, 1 vm per service. It's much easier to secure, backup, restore thanks to full isolation.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#5Most of our applications are either:
- app developped in-house (django/flask): Procfile + deploy with git push
- standard app with a docker image available: deploy directly
Dokku comes with useful "service" plugins for databases, auto https (letsencrypt), virtual hosts... Overall, a good experience.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#6The only thing I'd change in your workflow, perhaps, is switching from docker CLI commands to docker-compose. That'd make things a lot more reproducible and easy to read, and if you group relevant containers into a compose file, they're also automagically networked together, which is handy.
Your "trick" of grouping TCP ports by the hundreds is something I might steal, I've been using $lastport+1 for a while and now there's a bit of guesswork involved whenever I need to do things that don't go through the proxy. Then again, that's not often, so I might leave it.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#7Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#8Hopefully through cron and not manual invokation! Certbot can safely be executed daily by cron, as it will only attempt renewal if it is required.
Automating certificate renewal is an very important step in ensuring availability. I feel like part of the on-call sysadmin initiation process (pre-ACME days) was getting a frantic midnight phone call because someone forgot to renew a certificate...
I suspect they are using cron, but this has been omitted unintentionally.
Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#9Re: Self-Hosting Dozens of Web Applications and Services on a Single Server
#10I went the opposite direction, 1 vm per service. It's much easier to secure, backup, restore thanks to full isolation.
I hope you don't use the VM snapshotting feature as backup method? I had problems when running a database service on it for obvious reasons.