The only exposed containers are (usually) Traefik (80, 443). There is a docker network where traefik talks to all containers handling HTTP traffic.
Other containers run in their own separate docker networks.
766 karma · joined June 29, 2019
https://x.com/heysamtexas or
https://linkedin.com/in/heysamtexas/
The only exposed containers are (usually) Traefik (80, 443). There is a docker network where traefik talks to all containers handling HTTP traffic.
Other containers run in their own separate docker networks.
Dokku is an abstraction I don't want.
I get way more bang for the buck in terms of compute, storage, and memory with self-hosted/dedicated.
[1] - https://github.com/simplecto/makefile-taskrunner-template
I explicitly bind the external port only to the ZeroTier interface. In fact, my configs have changed a bit:
instead of:
ports:
- 5432:5432
I now use the IP of the zerotier interface: ports:
- 192.168.111.123:5432:5432
Now the only way to reach that port is via the vpn.You can simply apt-get install docker-compose. I am not familiar with other distributions. I suppose you could also pip install docker-compose as well.
Fortunately most of my systems remain in the default state. All the magic happens in docker/docker-compose.
1. I chose Postgres because I have the need to remotely manage as well as pull metrics into grafana and metabase. That is simply not possible with SQLite.
I realize this post should be a series of posts where I go deep on all parts of the SimpleCTO stack, so to speak.
2. My monitoring is quite limited because. Generally I use netdata to get a quick overview on health, and I export that into grafana. I rely on Hetzner for actual healthcheck and uptime monitoring. Sentry tells me if my code starts throwing too many exceptions or errors.
It is fun to learn, but it sucks to yak-shave [1] all the time.
The simplicity of the stack lets me walk away for days (or years) at a time, come back, and easily ship changes. No need to remember esoteric commands, configs, or get bitten by strange infrastructure upgrades.
I'm lazy, and I'm just looking for ways to be lazier. :-)
Once you internalize that your priorities change from all the tech hype (k8s, react, whatever) to actually working on the business problems. Not solving technical ones.
apt-get update && apt-get upgrade
rinse, repeat.
Secondly, all this cargo-culting around small containers is fine if you are cramming resources. I am not.
The reality is that my projects and many others are really, really over-provisioned. Looking at my graphs right now, I am on the front page of HN and my server load is still only 20%.
https://www.2ndquadrant.com/en/blog/what-is-select-skip-lock...
And implemented in Django:
https://docs.djangoproject.com/en/3.1/ref/models/querysets/#...
I dont see dockerizing as a problem. Once copied out from my template I never think about it. I do admit that familarity with the underlying Image OS (Debian in this case) makes debugging / fussing about a non-issue.
The nice thing with zero-tier is that it is literally two commands to get your network up and connected.
hide your eyes if curl|bash makes you cringe...
curl https://install.zerotier.com|bash
Then zerotier-cli join <your_network>
Go into the Zerotier web admin, check the box, and boom, that machine is on the network, securely.
Now I can spin up a bunch of containers for exploration/testing/or non-essential like grafana, prometheus, various exporters, metabase, etc.
I try to keep traefik clean and only serving secure traffic to "live" and customer-facing things on 80/443.
The daemon itself is just plain docker.
I run my blog and some small SaaS utils. I've never had a complaint ever about speed, responsiveness, or latency.
I thought it was because I eschewed bloated front-end frameworks. ;-)
Heroku at that spec really starts to hit the wallet.
More than engouh for a lot of applications. Hell, I ran a E-commerce company with 20MM USD/year in sales on a dedicated server from 2005-2013.
Most things are plain vanilla and rock stable. I can go from new server to running my first services is less than an hour. Ansible or cloud-init go a long way to turning my pets into cattle, so to speak.
I spend nearly no time "managing it" -- I have grafana dashboards and Hetzner monitoring the critical things.
Happy to share more.
https://www.curabase.com/org/curabase/bookmark-managers
Lots of room for multiple winners in this space because there are so many ways to solve niche use cases.
best of luck!
I was literally using the internet to make money on things that didn't have to ship.
2. Crazy sharp knives -- in the kitchen and on the worksite. The difference between a dull knife and sharp one gives me the same feeling of, "How did I live like that before?"
Off-hours / unsocial hours are there for triage until the full staff can come online and address the issues.
Also, the week of your rotation where you "wear the pager" means that you will often have the "on-call" hangover day. Essentially that is a day off of rest as to not exceed the 40/hrs week.
Obviously this differs company to company and country to country.