Get your own VPS with 2 vCPU Cores, 8 GB RAM and 100 GB NVMe Disk space for just $5.99 per month with the KVM2 plan from Hostinger. Get an extra 10% off with the code DREAMSOFCODE by visiting hostinger.com/dreamsofcode
I would absolutely love to see more content on VPS, self-hosting, etc. These days, lots of people need to know that non-Vercel-like options are not as scary as they might seem.
(note: I do think the didactic in this video is awesome, but...) Personally, I think him repeating the same 'voice tone loop' in literally every phrase is annoying. I mean he starts every phrase with a normal/high tone and ends the phrase with a lower voice tone. You don't need to use the same voice tone for every phrase to be didactic. Just a slightly annoyance that makes me not want to keep watching lol. but might me just me
@@edism Just because you disagree with something, it doesn’t mean it’s word salad. What they wrote was perfectly clear, and I understood every word in a single read-through. Whether I agree with it not is irrelevant; they expressed their opinion clearly.
I would love to do a whole production deployment with nix, especially flakes. it doesn't seem too unlikely to run a automation with github, that runs nixos rebuild using nixos-anywhere. this would mean we can completely ditch docker. Awesome video btw.
@@vidal9747 So does systemd. During my 8 years of consulting with Nix, most of the time we just ran services with systemd sandboxing. Nix is super for building the docker images though. And if you _really_ want actual containers, there's nixos containers or systemd-nspawn. Proper Docker gives you nice tooling and fancy networking, which is quite nice if you're deploying a cluster of services that are meant to work together.
I feel a little sorry for the number of people who will watch this video and think docker swarm is the best way to deploy to a vps. Kubernetes and k3s is infinitely better than docker swarm
The point is there are tradeoffs which he talked about in previous videos. FYI Kubernetes and k3s isn't perfect for everything either. There is always tradeoffs. This can get you far though especially for most engineers side projects and even those 5 man startups.
While I don't think it's entirely needed, at this point given the amount of management and config needed for docker stack, why not just go straight to k8s? It's not too difficult to get setup for simple apps and solves the same issues. I have no experience with docker stack, but just seems to me like it's a middle ground between running barebones docker and k8s.
Yea i think youre spot on. Its between raw docker and k8s, but as an SRE dealing with too many k8s issues I am so excited to check out Docker stack. K8s and Openshift have their place but its too complex for most usecases and no viable alternative exists.. I need to get into the nitty gritty of it still though, but this had do much potential!
@mptcz good point, my take lacks sufficient knowledge of docker stack, so can't say for sure. Would you rather do docker stack than k8s for smaller apps, is that what you're saying?
I disagree there is 5 times more config for K8s then a simple docker compose file. You know it so go for it but it is also not always a needed complexity.
the swarm way seems like requieres less learning for someone that already uses compose than going the k8s route directly. But I have to agree with you. At that point most people are better of using k8s, if only because is no more complex and its a good learning exercise if at some moment you need to work with a cluster (chances are it's gonna be a k8s one and not a swarm one), also there is a loot more tooling for k8s than for swarm. But I have to say, that if one wants to attempt a k8s install for a single machine, PLEASE do not consider for a second using some "vanilla" k8s flavor like kubeadm. It will be bloated and a pain to setup. People are way better using k3s (a CNCF project, so an "official" lightweight flavor) or k0s (from Mirantis, the company who bought Docker).
Yeah I’m with you. IMO the middle point between docker and k8s is already docker compose, if you need more, it make more sense to go straight to k8s. Especially that you either already know k8s, or you are going to learn a skill that have a huge value on the current job market, and isn’t that much more complicated. I’ve yet to see any company use docker swarm
Nice, it would be great to have an example of swam clustering with multiple worker nodes and how it's possible to load balance the traffic on those nodes. For instance ensuring that in the case were we don't want to use the manager nodes as ingresses, tell docker to host an instance of traefik on each worker nodes. But since the docker api is only available on the manager nodes (in order for traefik to discover services), either you have to host traefik on manager nodes or create an internal network allowing the workers to call the docker api on managers nodes. Or another opinion is to have an external load balancer but this require to map the ports to a host name or having a reverse proxy on each node to handle the domain name routing. I say this because manager nodes should not have a lot of resources as they "manage" and can be out of resources quickly if you have to handle a lot of traffic and also a 3 manager cluster can only provide the loss of one node, but you can loose a lot of worker, as the manager will reschedule the services. less spof mean more sleep !
Great video! Perhaps you can use multiple files (as overrides) in docker stack command to separate the stack specific features from compose. Similar feature in compose: docker compose -f compose.yaml -f compose.override.yaml ... Haven't tested this with stack, but will surely try
Definitely got the impression that the feature he's using is "docker stack". I googled it, and only got the docs for that command. Instead he's using docker swarm
Nice video, I have always tried to avoid docker swarm but I guess this is different. I noticed you didn't mention anything about scaling, How does this scale?
At this point i think it's worth to dig into a k3s setup instead since it's much more tailored to do what you want. But your approach is also interesting :)
i dont like yaml files.... xml is so more easy, there is mostly a definishen for all the tags... for free without any developer editor plugins to know that stuff..
You can do yaml in vim no issues ... no need to use an editor or plugins for them. xml is just so much more text, yaml is cleaner .... took me a while to like it over json :P But you can still use portainer if you want ... works with stack
Yaml is far more readable than XML. Just the fact that you need to close tags is just awful. Not to mention there is no easy way to make serializer/deserializer due to the fact that you can both have tag attributes and children having the same role.
Get your own VPS with 2 vCPU Cores, 8 GB RAM and 100 GB NVMe Disk space for just $5.99 per month with the KVM2 plan from Hostinger. Get an extra 10% off with the code DREAMSOFCODE by visiting hostinger.com/dreamsofcode
Cheaper on hetzner
I would absolutely love to see more content on VPS, self-hosting, etc. These days, lots of people need to know that non-Vercel-like options are not as scary as they might seem.
I mean this in the most respectful way possible, since you have the perfect podcast voice, I just assumed your handwriting was perfect…
In other news, I like the flow and editing here. Not like retention jacking, but a steady flow of visual transitions that work with the content
It's fine
(note: I do think the didactic in this video is awesome, but...) Personally, I think him repeating the same 'voice tone loop' in literally every phrase is annoying. I mean he starts every phrase with a normal/high tone and ends the phrase with a lower voice tone. You don't need to use the same voice tone for every phrase to be didactic. Just a slightly annoyance that makes me not want to keep watching lol. but might me just me
Word salad @@0.amonymous
@@edism Just because you disagree with something, it doesn’t mean it’s word salad. What they wrote was perfectly clear, and I understood every word in a single read-through. Whether I agree with it not is irrelevant; they expressed their opinion clearly.
I did not know docker worked remotely. Thanks for that!
man, you are the reason I started selling small apps deployed on VPS, thank you
I would love to do a whole production deployment with nix, especially flakes. it doesn't seem too unlikely to run a automation with github, that runs nixos rebuild using nixos-anywhere. this would mean we can completely ditch docker.
Awesome video btw.
Containers provide a sandbox that some people need.
devenv.nix solves this
@@vidal9747 So does systemd. During my 8 years of consulting with Nix, most of the time we just ran services with systemd sandboxing. Nix is super for building the docker images though. And if you _really_ want actual containers, there's nixos containers or systemd-nspawn. Proper Docker gives you nice tooling and fancy networking, which is quite nice if you're deploying a cluster of services that are meant to work together.
@@vidal9747 LXC xD
Things have become quite complicated these days. A 4 line Makefile that ran rsync used to be enough for "deployment".
I feel a little sorry for the number of people who will watch this video and think docker swarm is the best way to deploy to a vps. Kubernetes and k3s is infinitely better than docker swarm
And a ton more complex.
Just because something has a more varied feature set doesn't make it a better choice for all circumstances.
The point is there are tradeoffs which he talked about in previous videos. FYI Kubernetes and k3s isn't perfect for everything either. There is always tradeoffs. This can get you far though especially for most engineers side projects and even those 5 man startups.
This can be a good series of deploying on vps as full fledged alternative to railway/vercel flows.
While I don't think it's entirely needed, at this point given the amount of management and config needed for docker stack, why not just go straight to k8s? It's not too difficult to get setup for simple apps and solves the same issues.
I have no experience with docker stack, but just seems to me like it's a middle ground between running barebones docker and k8s.
Yea i think youre spot on. Its between raw docker and k8s, but as an SRE dealing with too many k8s issues I am so excited to check out Docker stack.
K8s and Openshift have their place but its too complex for most usecases and no viable alternative exists..
I need to get into the nitty gritty of it still though, but this had do much potential!
@mptcz good point, my take lacks sufficient knowledge of docker stack, so can't say for sure.
Would you rather do docker stack than k8s for smaller apps, is that what you're saying?
I disagree there is 5 times more config for K8s then a simple docker compose file. You know it so go for it but it is also not always a needed complexity.
the swarm way seems like requieres less learning for someone that already uses compose than going the k8s route directly. But I have to agree with you. At that point most people are better of using k8s, if only because is no more complex and its a good learning exercise if at some moment you need to work with a cluster (chances are it's gonna be a k8s one and not a swarm one), also there is a loot more tooling for k8s than for swarm.
But I have to say, that if one wants to attempt a k8s install for a single machine, PLEASE do not consider for a second using some "vanilla" k8s flavor like kubeadm. It will be bloated and a pain to setup. People are way better using k3s (a CNCF project, so an "official" lightweight flavor) or k0s (from Mirantis, the company who bought Docker).
Yeah I’m with you. IMO the middle point between docker and k8s is already docker compose, if you need more, it make more sense to go straight to k8s.
Especially that you either already know k8s, or you are going to learn a skill that have a huge value on the current job market, and isn’t that much more complicated.
I’ve yet to see any company use docker swarm
A note on creating Docker secrets, if you do that, don't forget to remove it from the shell history 😁
Will try to implement this on my VPS this weekend 🤞
Yes please do a cluster video!! Though I have already played around with it. It works works good all thought not as good as K8s.
Another video before I launch. Please do a whole entire thing for go lang. I wanna follow you set by step.
Personally I've been a happy Dokku user since 2016. Nice to consolidate all my personal apps onto one VPS
That damn DATABASE_URL environment variable is always the most important yet some how its always the one that is forgotten
wouldn't it just be easier to setup portainer agent on the vps and manage it with your local portainer instance
Is it similar to what kubernetes is providing?
Nice, it would be great to have an example of swam clustering with multiple worker nodes and how it's possible to load balance the traffic on those nodes.
For instance ensuring that in the case were we don't want to use the manager nodes as ingresses, tell docker to host an instance of traefik on each worker nodes.
But since the docker api is only available on the manager nodes (in order for traefik to discover services), either you have to host traefik on manager nodes or create an internal network allowing the workers to call the docker api on managers nodes.
Or another opinion is to have an external load balancer but this require to map the ports to a host name or having a reverse proxy on each node to handle the domain name routing.
I say this because manager nodes should not have a lot of resources as they "manage" and can be out of resources quickly if you have to handle a lot of traffic and also a 3 manager cluster can only provide the loss of one node, but you can loose a lot of worker, as the manager will reschedule the services. less spof mean more sleep !
Great video! Perhaps you can use multiple files (as overrides) in docker stack command to separate the stack specific features from compose. Similar feature in compose: docker compose -f compose.yaml -f compose.override.yaml ...
Haven't tested this with stack, but will surely try
More of these vps vids please
You’re absolutely killing it my friend. Keep these awesome videos coming! 🔥🔥🔥
🎉 Fantastic 👏
The better way to deploy applications on a VPS. Great video! BTW
Greetings from Brazil 👋
I seriously like dockploy and coolify and dokku with podman and potentially runc if you want very low overhead.
Wow, so docker swarm is actually being used in production? (nice content btw)
Am... you are using Swarm, not "stack".
In the video he says that Docker stack utilises Docker swarm mode on the target machine
Definitely got the impression that the feature he's using is "docker stack". I googled it, and only got the docs for that command. Instead he's using docker swarm
I 100% agree! It almost feels like magic!
Unless you are doing enterprise large scale deployments, Kubernetes is 9/10 times overkill. Swarm is a lot easier to use, deploy and manage.
This is such a time saver. Thanks!
Nice video, I have always tried to avoid docker swarm but I guess this is different. I noticed you didn't mention anything about scaling, How does this scale?
thank you very much for this tutorial, it came in the right time
Your napkin magic is just something! 😜
At this point i think it's worth to dig into a k3s setup instead since it's much more tailored to do what you want. But your approach is also interesting :)
Why do you prefer k3s over minik8s? Any specific reason?
Great and informative, love it ❤
This was a amazing video i watched today!
Supercool video -> off to use your coupon code. Cheers from Norway
Next video: why I set up my own Kubernetes stack on my cloud VPS 😄
I would love to see alternatives to yaml files. I don't like significant tabs
Zen browser user, W
nice content bro
Why are there no captions
I see that hyprland install... Why don't you tell us about that!
Why not Kamal man?
How long until we discover microk8s or just Kubernetes? 😂
Kubernetes is actually much more of a pain.
Docker swarm is super simple for basic deployments
Why not k3d/k3s
Just use k8s
Kubernetes?
why not k8s?
it requires more resources for simpler setups
Docker swarm is like k8s at home
I mean, there are github actions that were made just for this 🤷🏻♂️
k8s
Are you a native speaker? I sense 10% German.
there are many ways of doing deployments and this is the most complex one.
First comment :>>
yosif coming for you
@@yugalkhanal6967 a1mer comment before yosif no way
They can't catch me, am too faasstttt 🏎️ ⚡
i dont like yaml files.... xml is so more easy, there is mostly a definishen for all the tags... for free without any developer editor plugins to know that stuff..
You can do yaml in vim no issues ... no need to use an editor or plugins for them.
xml is just so much more text, yaml is cleaner .... took me a while to like it over json :P
But you can still use portainer if you want ... works with stack
Yaml is far more readable than XML. Just the fact that you need to close tags is just awful. Not to mention there is no easy way to make serializer/deserializer due to the fact that you can both have tag attributes and children having the same role.
20s ago 🥴🥹