Sam Johnson
Sam Johnson
  • Видео 14
  • Просмотров 15 749
How to get started with Kamal 2
Kamal 2 is out and brings some significant changes from the first version of Kamal. In this video, we walkthrough of how to setup a simple Ruby on Rails deployment with SQLite on using Kamal 2.
--------------------------------------
Reference Links:
Setting up Hetzner → ruclips.net/video/g5BvjOElMtY/видео.html
Setting up Postgres as an accessory → ruclips.net/video/CWisi8Xwh0M/видео.html
Просмотров: 1 212

Видео

How to handle Stripe Webhooks with Rails
Просмотров 3507 месяцев назад
Want to know everything that's going on with your money? Stripe webhooks are an essential part of any integration with Rails. Let's check out how to set them up. Reference Links Official Docs: docs.stripe.com/webhooks Need help getting your Stripe integration setup? devscoach.com/services/payments/rails-stripe-integration Check out twitter for more: samcraigjohnson #rails #webdevelo...
How to Build a Card Game in Vanilla HTML, CSS, & JS
Просмотров 3388 месяцев назад
In 2024, you don't need a bunch of frameworks to create a UI. Web Components have become standard in all major browsers, so you can build re-usable components with 0 dependencies. I walk through how to generate a whole matching card game in a single file, with nothing more than our trusty friends, html, css & plain ol' javascript.
Crash course in setting up Tailscale on your servers
Просмотров 3128 месяцев назад
Tailscale is an awesome service for people that run their own servers. I usually hate dealing with networking but using Tailscale makes it a lot easier. If you combine it with Kamal you can have nice DNS names to deploy to. (No one paid me to make this, I just like the service lol) Reference Links Tailscale: tailscale.com/ Check out devscoach.com to learn more about Rails and self-hosting.
Never lose data again with Postgres point-in-time recovery (PITR) & Kamal
Просмотров 1,1 тыс.9 месяцев назад
Your data is the most important asset you have. Making sure that you have a robust backup and restore process is a must when running Postgres. I will guide you through the steps to setup a point-in-time recovery (PITR) system that will let you time travel to any point in your databases' past. Reference Links Official Docs: www.postgresql.org/docs/current/continuous-archiving.html Code sample: g...
How to setup a Postgres streaming replica with Kamal
Просмотров 5479 месяцев назад
Setting up a Postgres streaming replica has a lot of advantages: hot backup, offloading analytics queries, and piece of mind. Using a simple bash script combined with Kamal, it's not too difficult to setup. Reference Links Official Docs: www.postgresql.org/docs/current/warm-standby.html Code sample: github.com/samcraigjohnson/simple-host/commit/03663e4e7414b420bb13811f7773cd68018b26db Kamal Han...
Make your app faster: Understanding HTTP caching
Просмотров 7059 месяцев назад
Fully utilize Cloudflare (or Fastly, Cloudfront, or any other CDN), the browser cache, or any other HTTP caches and make you app speedier. Also dive into Ruby on Rails's support for Etags and caching settings. Reference Links RFC: datatracker.ietf.org/doc/rfc9111/ `fresh_when`: apidock.com/rails/ActionController/ConditionalGet/fresh_when `stale?`: apidock.com/rails/ActionController/ConditionalG...
How to add UI interactions to Rails with Stimulus
Просмотров 1,1 тыс.9 месяцев назад
Let's finish up our deep work app by layering on auto save and loading skeletons to make it come alive. Stimulus lets us write lightweight reusable components in vanilla JS. Combined with Turbo we can build a modern application. Github → github.com/DevsCoach/deep-work-log
How to build an interactive UI with Rails and Turbo
Просмотров 2,1 тыс.9 месяцев назад
Learn how to use Turbo Drive, Turbo Frames, and Turbo Streams to create an interactive UI with Ruby on Rails without using React. The code → github.com/DevsCoach/deep-work-log Want to grow your craft? → devscoach.com/
Self host Nextjs with Kamal
Просмотров 1,2 тыс.10 месяцев назад
Is it possible to self-host Nextjs without Vercel? Yes! We can use Kamal just like with Ruby on Rails to deploy Nextjs. Follow along to see how we can use what we already learned to deploy anything with Docker & Kamal.
CI/CD for Rails & Kamal - Deployments from Scratch PT. 3
Просмотров 76510 месяцев назад
See how to quickly setup automated testing and automated deploys for our simple host setup. We are using Github Actions to run tests and deploy with Kamal.
Emoji Todo MVP in Rails in 8 min
Просмотров 17210 месяцев назад
Recently there was some talk about how easy it was to get a emoji todo app up in running in Next.js. I thought I would show how to do it in Rails. Enjoy!
Adding Postgres & Redis to Kamal - Deployments from Scratch PT. 2
Просмотров 1,6 тыс.10 месяцев назад
Building off of our first video. Updating our Kamal configuration to deploy Postgres and Redis inside of our Hetzner project.
Rails on Hetzner with Kamal - Deployments from Scratch PT. 1
Просмотров 4,2 тыс.10 месяцев назад
Walkthrough of how to setup a simple Ruby on Rails deployment with SQLite on Hetzner. It uses the new Kamal deployment system from Basecamp. This is the first video in the series of setting up Rails to be self hosted. Reference Links: Write up → devscoach.com/blog/kamal-hetzner-setup

Комментарии

  • @jenarocalvino2867
    @jenarocalvino2867 25 дней назад

    I've been struggling to run with an M1 mac, tried setting up remote builders on a VM and on a digital ocean droplet but no luck, has anyone succeeded?

  • @d2clon
    @d2clon Месяц назад

    Great job!. I am missing a continuation of the series with monitoring: APM, servers/DB metrics, Errors logging, Logs, ...

  • @d2clon
    @d2clon Месяц назад

    It is itchy to me seing you are using Sqlite in development and Postgres in production. Is this even possible? Postgres behaves different than Sqlite. I am not even sure if we can use the same schema.rb for both. No taking about Postgres unique features like special field types, index types, ...

  • @d2clon
    @d2clon Месяц назад

    This is a great serie. All new Rails deployment tutorials fail into the too-basic area. Your ones go a bit further. Thanks

  • @startupartisan
    @startupartisan Месяц назад

    What do you mean by the comment - Use 'assume_ssl' at 13:04 Should i modify the code?

  • @abdullahsaleh7196
    @abdullahsaleh7196 2 месяца назад

    keep going bro

  • @abdullahsaleh7196
    @abdullahsaleh7196 2 месяца назад

    Keep it up bro

  • @BufordTaylor
    @BufordTaylor 2 месяца назад

    Eagerly waiting the next video. Can't for the life of me get kamal2 to run with redis.

    • @devscoach
      @devscoach 2 месяца назад

      @@BufordTaylor What problem are you having? Working on a new one now

    • @dagan-gera-01
      @dagan-gera-01 2 месяца назад

      Same here. running through some problems getting my web app to connect with redis as an accessory

  • @timvanmonero2720
    @timvanmonero2720 2 месяца назад

    builder: Builder arch not set

    • @devscoach
      @devscoach 2 месяца назад

      I think you must be using Kamal 2. I am going to make a new video this week covering the changes in Kamal 2. For now you can check out the guide here: kamal-deploy.org/docs/upgrading/configuration-changes/

    • @timvanmonero2720
      @timvanmonero2720 2 месяца назад

      @@devscoach yes. it's very confusing starting with kamal2 and finding only kamal1 videos etc in the internet. thanks

    • @devscoach
      @devscoach 2 месяца назад

      @@timvanmonero2720 totally, they changed a lot, I'll get it up soon to help

  • @al3rez
    @al3rez 3 месяца назад

    i used kamal to deploy nextjs and it workedl ike a charm, but i had some issues with next-auth and callback url from google ever encountered that?

  • @samtechmap
    @samtechmap 3 месяца назад

    28 minutes...!

  • @alexohre
    @alexohre 4 месяца назад

    Thanks for the detailed explanation, i love you videos I have a question regarding the ssh proxy, in a case of two app-server and a load balancer connection the two app server and now I want to add postgres and redis. Do I just add the servers to the load balancer or I will have to do something else?

    • @devscoach
      @devscoach 2 месяца назад

      The app servers should connect directly to the redis and postgres instances, if they are on the same internal network you can just use their internal ip addresses i.e. 10.0.0.1, etc

    • @alexohre
      @alexohre 2 месяца назад

      @devscoach awesome, thank you for the info. I really appreciate Hope you would make another on kamal 2 soon?

  • @JTWebMan
    @JTWebMan 4 месяца назад

    Thank you, Thank you , Thank you so so so much! Got mine setup with no issues and tested it! Saves me so much per month over managed services when I knew this couldn't be that complicated.

  • @jnetto
    @jnetto 4 месяца назад

    Really helpful! Thanks for sharing!

  • @aruprakshit7218
    @aruprakshit7218 4 месяца назад

    Very good explanation. I was able to follow it without distractions. Meaning the teacher teaching here always on topic. Nice link one information to the other.

  • @VikrantSant-j1q
    @VikrantSant-j1q 4 месяца назад

    Finally, thanks!

  • @oleingemannk
    @oleingemannk 5 месяцев назад

    Need more videos sam :D Checking your account quite often now...

  • @64chaitanyaanand59
    @64chaitanyaanand59 6 месяцев назад

    Didn't understand a thing in this video. Could you atleast link the codes you used?

  • @arcstur
    @arcstur 6 месяцев назад

    Wow, this is such an amazing tutorial. Thank you so much!

  • @marekpietrucha839
    @marekpietrucha839 7 месяцев назад

    Thank you for a great video! Did you do a video on setting up a read replica with Kamal for postgresql? :)

    • @devscoach
      @devscoach 6 месяцев назад

      Not yet , but the streaming replica will work as a read replica. There is only one postgres setting you need to change to allow it to

  • @DavidMann10k
    @DavidMann10k 7 месяцев назад

    Very interesting. Some aspects seem verbose and brutal, others seem elegant and simpler than the framework solutions. I've been contemplating doing a project without a css framework. Especially as a lean on flex and rems more and more.

    • @devscoach
      @devscoach 7 месяцев назад

      Yeah for a huge project it would end up needing some better organization. Its more to see whats possible.

  • @DavidMann10k
    @DavidMann10k 7 месяцев назад

    Dang, I got it, that's so cool! I got a little distracted by the write up because it takes a different approach and I didn't pick up immediately that it was intended to be even simpler and eschew Cloudflare.

  • @Patrick-fq9or
    @Patrick-fq9or 8 месяцев назад

    'promosm'

  • @8ball54
    @8ball54 8 месяцев назад

    Hey Sam, thanks for these videos! They've been super helpful. Question on this: once you've enabled Tailscale SSH on your server, does that mean you can tighten down the SSH firewall rule to be specific to Tailscale's IPs? I'm referring to the firewall rules set up in your previous video on Hetzner. In my case, it'll be digital ocean. And additionally, does this mean you can also remove the keypair that was initially installed on the server? Thanks!

    • @devscoach
      @devscoach 8 месяцев назад

      Actually the great thing about Tailscale is you don't need to worry about allowing their IPs. Tailscale completely takes over the SSH connections so you should be able to safely block all other connections with your firewall. Essentially its like you are all on the same network. Yes you can delete the ssh keys! More info is here: tailscale.com/kb/1181/firewalls tailscale.com/learn/ssh-security-best-practices-protecting-your-remote-access-infrastructure#simplifying-ssh-security-with-tailscale

  • @hendrikmartina3552
    @hendrikmartina3552 8 месяцев назад

    Nice video m8. Only one question, do you think this configuration is production ready in case it isn't what is missing to get to that point?

    • @devscoach
      @devscoach 8 месяцев назад

      Thank you. I think its production ready. The only thing I would make sure is you have backups setup. I covered that here: ruclips.net/video/5AMLVUPrL0w/видео.html. But if you already have your own backup system setup, it should be good to go.

    • @hendrikmartina3552
      @hendrikmartina3552 8 месяцев назад

      @@devscoach awesome I will check it out. Another question I have , do you work for Basecamp or hey?

    • @devscoach
      @devscoach 8 месяцев назад

      @@hendrikmartina3552 Nope, I used to work for Atlassian but now I do Rails consulting

  • @johnmclane9851
    @johnmclane9851 8 месяцев назад

    which camera do you use ?

    • @devscoach
      @devscoach 8 месяцев назад

      It's my iPhone with continuity mode

  • @seriouslyiknowhowtoread
    @seriouslyiknowhowtoread 9 месяцев назад

    who are you, im glad youtube found you :) lol

  • @gunnars04
    @gunnars04 9 месяцев назад

    Exactly what I was looking for! Thanks a lot! ❤

    • @devscoach
      @devscoach 9 месяцев назад

      Glad it was helpful!

  • @muronuck
    @muronuck 9 месяцев назад

    Super informative, well spoken and very useful video! Subscribed for more!

    • @devscoach
      @devscoach 9 месяцев назад

      Thank you for watching!

  • @AjayCoding
    @AjayCoding 9 месяцев назад

    great video!👍

  • @thejespr
    @thejespr 9 месяцев назад

    Thanks for making this! :) Which keyboard are you using, sounds so damn satisfying :)

    • @devscoach
      @devscoach 9 месяцев назад

      Moonlander! I used to build my own keyboards but after this I won’t go back

    • @thejespr
      @thejespr 9 месяцев назад

      @@devscoach Ah nice! Have you shared your layout of it somewhere? I had such a hard time transitioning to mine, had a tough time finding a coding layout i found "natural" (that says more about me than the keyboard :))

    • @devscoach
      @devscoach 9 месяцев назад

      @@thejespr I just posted it to twitter: twitter.com/samcraigjohnson/status/1768117744208380271 Getting used to split keyboard was one of the better things I have done for wrist health. It takes time though. My only advice is you have to start typing slower so that the muscle memory builds up. There is probably 2-3 weeks of frustration before it feels natural. Going slower actually makes you progress faster I think.

  • @JoeKaldas8
    @JoeKaldas8 10 месяцев назад

    Been banging my head whole last week This was SO SO helpful! Thank you so much!

  • @ArthurxAriza
    @ArthurxAriza 10 месяцев назад

    A gist or a repository would be nice.

    • @devscoach
      @devscoach 10 месяцев назад

      Definitely, I'm working on cleaning up the code and adding comments but I will make it public.

    • @LuckyImposter
      @LuckyImposter 4 месяца назад

      @@devscoach is the repo of this video public? thanks nice tutorial.

  •  10 месяцев назад

    Excellent content! 👏🏼👏🏼👏🏼

  • @GurbanHaydarov
    @GurbanHaydarov 10 месяцев назад

    Thanks!

  • @lorenzorev
    @lorenzorev 10 месяцев назад

    Thanks! I didn't know about the firewall and Traefik settings parts, just added them to my current setup! just a note, if you are adding these configurations to an existing kamal deployed app, make sure to reboot Traefik via the command: kamal traefik reboot

    • @devscoach
      @devscoach 10 месяцев назад

      Good point! I’ve forgotten to run that before.

  • @ernestadonu9110
    @ernestadonu9110 10 месяцев назад

    Should I dockerize my application before I can use kamal?

    • @devscoach
      @devscoach 10 месяцев назад

      Yes Kamal requires everything is a docker image to deploy. Rails has a nice gem called dockerfile-rails which makes a generator to autogenerate dockerfile if you need.

    • @ernestadonu9110
      @ernestadonu9110 10 месяцев назад

      @@devscoach thank you for this

  • @ernestadonu9110
    @ernestadonu9110 10 месяцев назад

    We will support by subscribing and learn how to Deploy.