docker stack is my new favorite way to deploy to a VPS

  Рет қаралды 31,061

Dreams of Code

Dreams of Code

Күн бұрын

Пікірлер: 144
@dreamsofcode
@dreamsofcode 20 сағат бұрын
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
@twitchizle
@twitchizle 15 сағат бұрын
Cheaper on hetzner
@lastink444
@lastink444 16 сағат бұрын
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.
@TheLongBen
@TheLongBen 9 сағат бұрын
I second this ☝️
@ShinSpiegel
@ShinSpiegel 5 сағат бұрын
totally agree with you, there is a price for the convenience.
@tonyhart2744
@tonyhart2744 4 сағат бұрын
@@ShinSpiegel there is so many open source vercel,heroku like alternative Yes its a maybe 1 time hassle to setup but after that ???? You have your own little *vercel* that basically do the same thing
@cody_codes_youtube
@cody_codes_youtube 18 сағат бұрын
I mean this in the most respectful way possible, since you have the perfect podcast voice, I just assumed your handwriting was perfect…
@cody_codes_youtube
@cody_codes_youtube 17 сағат бұрын
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
@georgehelyar
@georgehelyar 17 сағат бұрын
It's fine
@0.amonymous
@0.amonymous 16 сағат бұрын
(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
@edism 13 сағат бұрын
Word salad ​@@0.amonymous
@Innesb
@Innesb 12 сағат бұрын
@@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.
@RichardDavenport
@RichardDavenport 11 сағат бұрын
This is great. We do this at work in production with a cluster of just 5 manager nodes in the swarm. It does literally anything we need. The only thing you'll need to look out for is when there is a failover. You'll need to pass the `--with-registry-auth` flag when you deploy. This will will forward the auth to other nodes that don't have the authentication to pull from the private registry.
@achaabni
@achaabni 15 сағат бұрын
man, you are the reason I started selling small apps deployed on VPS, thank you
@craig9668
@craig9668 14 сағат бұрын
Things have become quite complicated these days. A 4 line Makefile that ran rsync used to be enough for "deployment".
@classic-25
@classic-25 6 сағат бұрын
At this point I'm just tired😪
@inithinx
@inithinx 19 сағат бұрын
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
@vidal9747 18 сағат бұрын
Containers provide a sandbox that some people need.
@zomakaja
@zomakaja 18 сағат бұрын
devenv.nix solves this
@chrishoppner150
@chrishoppner150 14 сағат бұрын
@@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.
@Bozebo
@Bozebo 14 сағат бұрын
@@vidal9747 LXC xD
@lucasew
@lucasew 9 сағат бұрын
There where a NIXPKGS_ALLOW_UNFREE in his Ctrl+R so it seems Nix content is probably being cooked now.
@hammer86_
@hammer86_ 13 сағат бұрын
I did not know docker worked remotely. Thanks for that!
@guiorgy
@guiorgy 15 сағат бұрын
A note on creating Docker secrets, if you do that, don't forget to remove it from the shell history 😁
@bapireddy5790
@bapireddy5790 15 сағат бұрын
This can be a good series of deploying on vps as full fledged alternative to railway/vercel flows.
@tyrellnelson
@tyrellnelson 17 сағат бұрын
That damn DATABASE_URL environment variable is always the most important yet some how its always the one that is forgotten
@EvanMildenberger
@EvanMildenberger 5 сағат бұрын
Amazing! I've liked using Docker compose but have all the same devops challenges as you. I think I'll incorporate your Zenstats repo as a template for the CICD pipeline 👋
@gustanobreza
@gustanobreza 12 сағат бұрын
🎉 Fantastic 👏 The better way to deploy applications on a VPS. Great video! BTW Greetings from Brazil 👋
@nitinnamdev5627
@nitinnamdev5627 8 сағат бұрын
Very informative video, Thanks for sharing the insights of docker
@zstudioinc9409
@zstudioinc9409 19 сағат бұрын
Another video before I launch. Please do a whole entire thing for go lang. I wanna follow you set by step.
@deepraj11pop
@deepraj11pop 7 сағат бұрын
Lovely overview of docker stack! A small issue with 14:42. If you use `printf` to pipe the password to STDIN like that then it gets stored in your shell history in plaintext. This is precisely why docker does not allow you to pass the value as a command line argument. By piping, you have done exactly what they were trying to avoid. It would be helpful if this context is included and people are instructed to either type directly to STDIN or use the file approach (and delete right after).
@blixenkrone
@blixenkrone 18 сағат бұрын
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.
@mptcz
@mptcz 17 сағат бұрын
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!
@blixenkrone
@blixenkrone 16 сағат бұрын
@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?
@JTWebMan
@JTWebMan 14 сағат бұрын
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.
@cazador517
@cazador517 14 сағат бұрын
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).
@andyvirus2300
@andyvirus2300 13 сағат бұрын
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
@JTWebMan
@JTWebMan 14 сағат бұрын
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.
@EvanVerworn
@EvanVerworn 18 сағат бұрын
Personally I've been a happy Dokku user since 2016. Nice to consolidate all my personal apps onto one VPS
@mrmakra-eo1kx
@mrmakra-eo1kx 2 сағат бұрын
damn this is everything all together in one video i knew parts of this setup but never tried to parse it all together and fill in the gaps, now i see how it looks like and damn it looks beautiful ❤
@dushmanta05
@dushmanta05 13 сағат бұрын
Will try to implement this on my VPS this weekend 🤞
@sarabwt
@sarabwt 18 сағат бұрын
Am... you are using Swarm, not "stack".
@OfficialViper
@OfficialViper 16 сағат бұрын
In the video he says that Docker stack utilises Docker swarm mode on the target machine
@ariseyhun2085
@ariseyhun2085 15 сағат бұрын
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
@ShinSpiegel
@ShinSpiegel 5 сағат бұрын
Like usual a nice video with a heavily dense packed amount of information. Thanks for sharing the video.
@kiyov09
@kiyov09 14 сағат бұрын
You’re absolutely killing it my friend. Keep these awesome videos coming! 🔥🔥🔥
@josephsebastian943
@josephsebastian943 16 сағат бұрын
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
@ci_trex
@ci_trex 13 сағат бұрын
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 !
@arinjii5745
@arinjii5745 17 сағат бұрын
More of these vps vids please
@rtorcato
@rtorcato 16 сағат бұрын
wouldn't it just be easier to setup portainer agent on the vps and manage it with your local portainer instance
@RealEstate3D
@RealEstate3D 11 сағат бұрын
@@rtorcato I won’t ever go back from portainer.
@fronix5060
@fronix5060 14 сағат бұрын
Unless you are doing enterprise large scale deployments, Kubernetes is 9/10 times overkill. Swarm is a lot easier to use, deploy and manage.
@Serizon_
@Serizon_ 18 сағат бұрын
I seriously like dockploy and coolify and dokku with podman and potentially runc if you want very low overhead.
@sebastianxx3687
@sebastianxx3687 11 сағат бұрын
awesome content/ level of details and video quality
@TarasShabatin
@TarasShabatin 7 сағат бұрын
You have to try k8s 😊
@jin6086
@jin6086 19 сағат бұрын
I 100% agree! It almost feels like magic!
@pedestrianlove
@pedestrianlove 18 сағат бұрын
Wow, so docker swarm is actually being used in production? (nice content btw)
@johannsix2161
@johannsix2161 2 сағат бұрын
Really nice explanation and easy to understand. I was thinking why you don't use NixOs for a server. It would be easy to create a new VPS for another app with the config.
@ghooly12
@ghooly12 17 сағат бұрын
This is such a time saver. Thanks!
@winken2666
@winken2666 4 сағат бұрын
I opted for docker swarm instead of kubernetes. It's not a perfect setup but very reasonable for my needs.
@petrpechkurov3095
@petrpechkurov3095 28 минут бұрын
Hi! Thanks for the cool video! Really enjoyed it! I have one question regarding secrets. You mentioned that it's not really secure to have them on your remote as files. But can't you exec into a running container and then cat /run/secrets/your_secret? What am I missing here? Thanks!
@fifty6737
@fifty6737 16 сағат бұрын
thank you very much for this tutorial, it came in the right time
@MrOfigenko
@MrOfigenko 4 сағат бұрын
so mind boggling when you're watching a serious educational video looking to integrate new practices into your workflow only to be abruptly stopped by this 2:59
@Tresla
@Tresla 15 сағат бұрын
Next video: why I set up my own Kubernetes stack on my cloud VPS 😄
@chukwuemekaajima8373
@chukwuemekaajima8373 13 сағат бұрын
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?
@harsh_9797
@harsh_9797 39 минут бұрын
Any tutorial on how to Customizing terminal look like yours? It's looks minimalist yet statisfiying.
@rodemka
@rodemka 18 сағат бұрын
Your napkin magic is just something! 😜
@TheLongBen
@TheLongBen 9 сағат бұрын
Top quality content as usual 😊
@ivanmaglica264
@ivanmaglica264 28 минут бұрын
This means no need to deal with Kubernetes, right? What scenarios are there that kubernetes would still be better for?
@FlakerimIsmani
@FlakerimIsmani 14 сағат бұрын
Why not Kamal man?
@KaupoParmas
@KaupoParmas 17 сағат бұрын
Great and informative, love it ❤
@whatgpt-md4ri
@whatgpt-md4ri 2 сағат бұрын
you don't need to use stack for CI/CD integration - you can stay on docker compose, and use github actions to redeploy docker image. You do experience downtime doing like that.
@RazoBeckett.
@RazoBeckett. 16 сағат бұрын
This was a amazing video i watched today!
@Fullflexno
@Fullflexno 18 сағат бұрын
Supercool video -> off to use your coupon code. Cheers from Norway
@dimitrioskoulartsas6184
@dimitrioskoulartsas6184 11 сағат бұрын
On default Docker configuration, adding a user to the "docker" group is the same as being root. One can run the following to get root privileges on the host: docker run --rm -it --privileged --pid=host debian:12 nsenter -a -t1 bash Let me break it down: docker run = run a new container --rm = delete the container after exit -it = attach to container to the current tty --privileged = give all capabilities, supported by the kernel, to the container --pid=host = use host's pid namespace. normally, Docker containers cannot see the host's processes debian:12 = use the Debian 12 image nsenter = run nsenter in the container, to enter a different namespace -a = enter all namespaces of the target -t1 = set the target to be the process with PID 1, usually systemd or /sbin/init bash = open a bash shell after entering the namespace(s)
@Mankepanke
@Mankepanke 6 минут бұрын
Came to the comments to say the same thing. That user is like a passwordless sudo...
@Mankepanke
@Mankepanke 4 минут бұрын
Another way is to run any container and mount the filesystem, then you can make any changes you want, including adding a setuid binary owned by root to then escalate outside of Docker, changing sudoers to allow anything to the deployment user, and adding malware to real user's startup scripts.
@avalagum7957
@avalagum7957 13 сағат бұрын
Is it similar to what kubernetes is providing?
@MelroyvandenBerg
@MelroyvandenBerg 10 сағат бұрын
It's worse what Kubernetes provides.
@42-jj
@42-jj 11 сағат бұрын
Great video
@RayZ3R069
@RayZ3R069 15 сағат бұрын
Zen browser user, W
@FedericoDanielAnastasi-b9w
@FedericoDanielAnastasi-b9w 12 сағат бұрын
I would love to see alternatives to yaml files. I don't like significant tabs
@kevharv
@kevharv 7 сағат бұрын
This seems like something between Docker Compose and K3s. With that being said, I don’t see the advantage of this over a proper Kubernetes environment, especially if you’re going to scale up and out.
@loudcoringa5935
@loudcoringa5935 18 сағат бұрын
nice content bro
@graphiclife5416
@graphiclife5416 Сағат бұрын
Coolify FTW
@sweetboss151
@sweetboss151 19 сағат бұрын
Why are there no captions
@fatcat500
@fatcat500 9 сағат бұрын
If I use docker swarm with just one node, why would I need replicas? Or load balancing?
@Mankepanke
@Mankepanke 7 минут бұрын
Maybe your app containers themselves are single threaded and you want to scale to using multiple cores
@MultimediaCizzy
@MultimediaCizzy 19 сағат бұрын
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 :)
@hendrywilliam
@hendrywilliam 17 сағат бұрын
Why do you prefer k3s over minik8s? Any specific reason?
@MultimediaCizzy
@MultimediaCizzy 18 минут бұрын
@@hendrywilliam just personal preference and experience with it :)
@mattcargile
@mattcargile 11 сағат бұрын
Dang. You don’t have a password on your private key?! Or was it already in the agent?
@CraigBurden1
@CraigBurden1 14 сағат бұрын
I see that hyprland install... Why don't you tell us about that!
@avramukk
@avramukk 10 сағат бұрын
good
@ariseyhun2085
@ariseyhun2085 15 сағат бұрын
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
@nicholaskinzel3908
@nicholaskinzel3908 14 сағат бұрын
And a ton more complex. Just because something has a more varied feature set doesn't make it a better choice for all circumstances.
@JTWebMan
@JTWebMan 14 сағат бұрын
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.
@StingSting844
@StingSting844 6 сағат бұрын
And infinitely more complex
@jit-r5b
@jit-r5b 4 сағат бұрын
I love K8s but I cannot use them on a single 5usd vps (that I recommend getting from Hetzner). I've deploying with compose for years now and on a small scale it's a breeze :)
@stephensumpter5311
@stephensumpter5311 18 сағат бұрын
How long until we discover microk8s or just Kubernetes? 😂
@jameswithdrwho
@jameswithdrwho 17 сағат бұрын
Kubernetes is actually much more of a pain. Docker swarm is super simple for basic deployments
@Danielo515
@Danielo515 4 сағат бұрын
Sounds too good ro be true 😂
@vng-alien
@vng-alien 8 сағат бұрын
Kubernetes. (we all know u dont need it but yuh do)
@MW-mn1el
@MW-mn1el 16 сағат бұрын
Why not k3d/k3s
@dungeon4971
@dungeon4971 Сағат бұрын
why not k8s at this point
@Mankepanke
@Mankepanke Минут бұрын
"If you are annoyed by having to walk to the store, why not try biking? Here's how to use a bicycle..." "At that point, why not just use a large truck that needs a dedicated refueling station and a team of mechanics?"
@AidanCanavan-v5i
@AidanCanavan-v5i 18 сағат бұрын
Just use k8s
@KlausMingo
@KlausMingo 6 сағат бұрын
Why are you wearing headphones?
@whynot9963
@whynot9963 15 сағат бұрын
I mean, there are github actions that were made just for this 🤷🏻‍♂️
@PiotrKosmowski
@PiotrKosmowski 14 сағат бұрын
Kubernetes?
@manojos4114
@manojos4114 18 сағат бұрын
why not k8s?
@danko95bgd
@danko95bgd 18 сағат бұрын
it requires more resources for simpler setups
@thatrand0mnpc
@thatrand0mnpc 18 сағат бұрын
Docker swarm is like k8s at home
@Mankepanke
@Mankepanke Минут бұрын
Why not run your own power plant and employ a small town to maintain it?
@phoneywheeze
@phoneywheeze 7 сағат бұрын
just use vercel lil bro
@cornjulio4033
@cornjulio4033 13 сағат бұрын
Are you a native speaker? I sense 10% German.
@PierreCarette
@PierreCarette 12 сағат бұрын
k8s
@trojanhorses4760
@trojanhorses4760 5 сағат бұрын
Just my 2 cents - I am pretty sure that you do not have such "prod" vms as ufw will break docker unless you do some tweaks or use docker-ufw, additionally swarm takes a lot more resources from a system so this breaks the whole idea of just using a small vm, and a final point - this wont work for multiple compose setup as most "prod" environments use compose, in order to allow seamless restarts behind the reverse proxy. Maybe stop doing hosting promos and instead do real meaningful guides.
@elieobeid77
@elieobeid77 17 сағат бұрын
there are many ways of doing deployments and this is the most complex one.
@fahimferdous1641
@fahimferdous1641 19 сағат бұрын
First comment :>>
@yugalkhanal6967
@yugalkhanal6967 19 сағат бұрын
yosif coming for you
@a1mer06
@a1mer06 19 сағат бұрын
@@yugalkhanal6967 a1mer comment before yosif no way
@fahimferdous1641
@fahimferdous1641 19 сағат бұрын
They can't catch me, am too faasstttt 🏎️ ⚡
@mikelinsi
@mikelinsi 19 сағат бұрын
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..
@mitchellmnr
@mitchellmnr 19 сағат бұрын
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
@Gornius
@Gornius 18 сағат бұрын
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.
@HarshaVardhan-rb7ju
@HarshaVardhan-rb7ju 19 сағат бұрын
20s ago 🥴🥹
Setting up a production ready VPS is a lot easier than I thought.
29:50
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 10 МЛН
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,3 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Elon LEAKS New Tesla On X | It's Everything We Want
20:51
Ryan Shaw
Рет қаралды 90 М.
Angular v19 Developer Event
22:54
Angular
Рет қаралды 45 М.
The embed package is a lot more useful than I originally thought...
16:56
Windsurf Editor TUTORIAL // Better than Cursor? (yes)
21:42
codes with ai
Рет қаралды 7 М.
Can a single 1.2 GHz core process 10 Gb/s? Yes, it can!
20:54
Tomaž Zaman
Рет қаралды 20 М.
CachyOS - Arch Linux Distro with PATCHED Kernel
10:01
TechHut
Рет қаралды 6 М.
My Hyprland And Waybar Configurations
14:05
DistroTube
Рет қаралды 16 М.
SQLc is the perfect tool for those who don't like ORMs
28:11
Dreams of Code
Рет қаралды 106 М.
DONT use Neovim!! (in these scenarios)
8:56
typecraft
Рет қаралды 31 М.
Best Docker Container Server Setup // Docker Swarm, CephFS, and Portainer
23:06
бабл ти гель для душа // Eva mash
01:00
EVA mash
Рет қаралды 10 МЛН