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

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 91

  • @dreamsofcode
    @dreamsofcode  8 ชั่วโมงที่ผ่านมา +3

    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 3 ชั่วโมงที่ผ่านมา

      Cheaper on hetzner

  • @lastink444
    @lastink444 4 ชั่วโมงที่ผ่านมา +26

    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.

  • @cody_codes_youtube
    @cody_codes_youtube 6 ชั่วโมงที่ผ่านมา +71

    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 5 ชั่วโมงที่ผ่านมา +3

      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 4 ชั่วโมงที่ผ่านมา +2

      It's fine

    • @0.amonymous
      @0.amonymous 4 ชั่วโมงที่ผ่านมา +3

      (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 ชั่วโมงที่ผ่านมา

      Word salad ​@@0.amonymous

    • @Innesb
      @Innesb 13 นาทีที่ผ่านมา

      @@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.

  • @hammer86_
    @hammer86_ ชั่วโมงที่ผ่านมา +1

    I did not know docker worked remotely. Thanks for that!

  • @achaabni
    @achaabni 3 ชั่วโมงที่ผ่านมา +3

    man, you are the reason I started selling small apps deployed on VPS, thank you

  • @inithinx
    @inithinx 7 ชั่วโมงที่ผ่านมา +26

    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 6 ชั่วโมงที่ผ่านมา +4

      Containers provide a sandbox that some people need.

    • @zomakaja
      @zomakaja 6 ชั่วโมงที่ผ่านมา

      devenv.nix solves this

    • @chrishoppner150
      @chrishoppner150 2 ชั่วโมงที่ผ่านมา

      @@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 ชั่วโมงที่ผ่านมา

      @@vidal9747 LXC xD

  • @craig9668
    @craig9668 2 ชั่วโมงที่ผ่านมา +4

    Things have become quite complicated these days. A 4 line Makefile that ran rsync used to be enough for "deployment".

  • @ariseyhun2085
    @ariseyhun2085 3 ชั่วโมงที่ผ่านมา +10

    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 2 ชั่วโมงที่ผ่านมา +4

      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 2 ชั่วโมงที่ผ่านมา +4

      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.

  • @bapireddy5790
    @bapireddy5790 3 ชั่วโมงที่ผ่านมา +1

    This can be a good series of deploying on vps as full fledged alternative to railway/vercel flows.

  • @blixenkrone
    @blixenkrone 6 ชั่วโมงที่ผ่านมา +16

    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 5 ชั่วโมงที่ผ่านมา +1

      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 4 ชั่วโมงที่ผ่านมา

      @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 2 ชั่วโมงที่ผ่านมา

      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 2 ชั่วโมงที่ผ่านมา

      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 ชั่วโมงที่ผ่านมา +1

      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

  • @guiorgy
    @guiorgy 3 ชั่วโมงที่ผ่านมา +2

    A note on creating Docker secrets, if you do that, don't forget to remove it from the shell history 😁

  • @dushmanta05
    @dushmanta05 ชั่วโมงที่ผ่านมา

    Will try to implement this on my VPS this weekend 🤞

  • @JTWebMan
    @JTWebMan 2 ชั่วโมงที่ผ่านมา

    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.

  • @zstudioinc9409
    @zstudioinc9409 7 ชั่วโมงที่ผ่านมา +1

    Another video before I launch. Please do a whole entire thing for go lang. I wanna follow you set by step.

  • @EvanVerworn
    @EvanVerworn 6 ชั่วโมงที่ผ่านมา +2

    Personally I've been a happy Dokku user since 2016. Nice to consolidate all my personal apps onto one VPS

  • @tyrellnelson
    @tyrellnelson 5 ชั่วโมงที่ผ่านมา +1

    That damn DATABASE_URL environment variable is always the most important yet some how its always the one that is forgotten

  • @rtorcato
    @rtorcato 4 ชั่วโมงที่ผ่านมา +4

    wouldn't it just be easier to setup portainer agent on the vps and manage it with your local portainer instance

  • @avalagum7957
    @avalagum7957 ชั่วโมงที่ผ่านมา +1

    Is it similar to what kubernetes is providing?

  • @ci_trex
    @ci_trex ชั่วโมงที่ผ่านมา

    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 !

  • @josephsebastian943
    @josephsebastian943 4 ชั่วโมงที่ผ่านมา

    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

  • @arinjii5745
    @arinjii5745 5 ชั่วโมงที่ผ่านมา +1

    More of these vps vids please

  • @kiyov09
    @kiyov09 2 ชั่วโมงที่ผ่านมา

    You’re absolutely killing it my friend. Keep these awesome videos coming! 🔥🔥🔥

  • @gustanobreza
    @gustanobreza 17 นาทีที่ผ่านมา

    🎉 Fantastic 👏
    The better way to deploy applications on a VPS. Great video! BTW
    Greetings from Brazil 👋

  • @Serizon_
    @Serizon_ 6 ชั่วโมงที่ผ่านมา +1

    I seriously like dockploy and coolify and dokku with podman and potentially runc if you want very low overhead.

  • @pedestrianlove
    @pedestrianlove 6 ชั่วโมงที่ผ่านมา +2

    Wow, so docker swarm is actually being used in production? (nice content btw)

  • @sarabwt
    @sarabwt 5 ชั่วโมงที่ผ่านมา +13

    Am... you are using Swarm, not "stack".

    • @OfficialViper
      @OfficialViper 4 ชั่วโมงที่ผ่านมา

      In the video he says that Docker stack utilises Docker swarm mode on the target machine

    • @ariseyhun2085
      @ariseyhun2085 3 ชั่วโมงที่ผ่านมา +2

      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

  • @jin6086
    @jin6086 7 ชั่วโมงที่ผ่านมา

    I 100% agree! It almost feels like magic!

  • @fronix5060
    @fronix5060 ชั่วโมงที่ผ่านมา +1

    Unless you are doing enterprise large scale deployments, Kubernetes is 9/10 times overkill. Swarm is a lot easier to use, deploy and manage.

  • @ghooly12
    @ghooly12 5 ชั่วโมงที่ผ่านมา

    This is such a time saver. Thanks!

  • @chukwuemekaajima8373
    @chukwuemekaajima8373 ชั่วโมงที่ผ่านมา

    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?

  • @fifty6737
    @fifty6737 4 ชั่วโมงที่ผ่านมา

    thank you very much for this tutorial, it came in the right time

  • @rodemka
    @rodemka 6 ชั่วโมงที่ผ่านมา

    Your napkin magic is just something! 😜

  • @MultimediaCizzy
    @MultimediaCizzy 7 ชั่วโมงที่ผ่านมา +7

    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 5 ชั่วโมงที่ผ่านมา

      Why do you prefer k3s over minik8s? Any specific reason?

  • @KaupoParmas
    @KaupoParmas 5 ชั่วโมงที่ผ่านมา

    Great and informative, love it ❤

  • @RazoBeckett.
    @RazoBeckett. 4 ชั่วโมงที่ผ่านมา

    This was a amazing video i watched today!

  • @Fullflexno
    @Fullflexno 6 ชั่วโมงที่ผ่านมา

    Supercool video -> off to use your coupon code. Cheers from Norway

  • @Tresla
    @Tresla 3 ชั่วโมงที่ผ่านมา

    Next video: why I set up my own Kubernetes stack on my cloud VPS 😄

  • @FedericoDanielAnastasi-b9w
    @FedericoDanielAnastasi-b9w 26 นาทีที่ผ่านมา

    I would love to see alternatives to yaml files. I don't like significant tabs

  • @RayZ3R069
    @RayZ3R069 3 ชั่วโมงที่ผ่านมา

    Zen browser user, W

  • @loudcoringa5935
    @loudcoringa5935 5 ชั่วโมงที่ผ่านมา

    nice content bro

  • @sweetboss151
    @sweetboss151 6 ชั่วโมงที่ผ่านมา +1

    Why are there no captions

  • @CraigBurden1
    @CraigBurden1 2 ชั่วโมงที่ผ่านมา

    I see that hyprland install... Why don't you tell us about that!

  • @FlakerimIsmani
    @FlakerimIsmani 2 ชั่วโมงที่ผ่านมา

    Why not Kamal man?

  • @stephensumpter5311
    @stephensumpter5311 5 ชั่วโมงที่ผ่านมา +1

    How long until we discover microk8s or just Kubernetes? 😂

    • @jameswithdrwho
      @jameswithdrwho 5 ชั่วโมงที่ผ่านมา +1

      Kubernetes is actually much more of a pain.
      Docker swarm is super simple for basic deployments

  • @MW-mn1el
    @MW-mn1el 3 ชั่วโมงที่ผ่านมา

    Why not k3d/k3s

  • @AidanCanavan-v5i
    @AidanCanavan-v5i 6 ชั่วโมงที่ผ่านมา

    Just use k8s

  • @PiotrKosmowski
    @PiotrKosmowski 2 ชั่วโมงที่ผ่านมา

    Kubernetes?

  • @manojos4114
    @manojos4114 6 ชั่วโมงที่ผ่านมา +2

    why not k8s?

    • @danko95bgd
      @danko95bgd 6 ชั่วโมงที่ผ่านมา +1

      it requires more resources for simpler setups

    • @thatrand0mnpc
      @thatrand0mnpc 6 ชั่วโมงที่ผ่านมา

      Docker swarm is like k8s at home

  • @whynot9963
    @whynot9963 3 ชั่วโมงที่ผ่านมา

    I mean, there are github actions that were made just for this 🤷🏻‍♂️

  • @PierreCarette
    @PierreCarette 10 นาทีที่ผ่านมา

    k8s

  • @cornjulio4033
    @cornjulio4033 ชั่วโมงที่ผ่านมา

    Are you a native speaker? I sense 10% German.

  • @elieobeid77
    @elieobeid77 5 ชั่วโมงที่ผ่านมา

    there are many ways of doing deployments and this is the most complex one.

  • @fahimferdous1641
    @fahimferdous1641 7 ชั่วโมงที่ผ่านมา

    First comment :>>

    • @yugalkhanal6967
      @yugalkhanal6967 7 ชั่วโมงที่ผ่านมา

      yosif coming for you

    • @a1mer06
      @a1mer06 7 ชั่วโมงที่ผ่านมา +1

      @@yugalkhanal6967 a1mer comment before yosif no way

    • @fahimferdous1641
      @fahimferdous1641 7 ชั่วโมงที่ผ่านมา

      They can't catch me, am too faasstttt 🏎️ ⚡

  • @mikelinsi
    @mikelinsi 7 ชั่วโมงที่ผ่านมา +1

    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 6 ชั่วโมงที่ผ่านมา +3

      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 6 ชั่วโมงที่ผ่านมา +6

      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 7 ชั่วโมงที่ผ่านมา

    20s ago 🥴🥹