- Видео 14
- Просмотров 15 749
Sam Johnson
Добавлен 9 фев 2024
Hey! I'm here to talk about Ruby on Rails, self-hosting, and building products.
I have 12+ years working in the software world at big places like Cisco Systems and Atlassian as well as startups like Statuspage.
Follow me on twitter/X for more: samcraigjohnson
#rails #rubyonrails #devops #saas #webdevelopment
I have 12+ years working in the software world at big places like Cisco Systems and Atlassian as well as startups like Statuspage.
Follow me on twitter/X for more: samcraigjohnson
#rails #rubyonrails #devops #saas #webdevelopment
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
--------------------------------------
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
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?
Great job!. I am missing a continuation of the series with monitoring: APM, servers/DB metrics, Errors logging, Logs, ...
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, ...
This is a great serie. All new Rails deployment tutorials fail into the too-basic area. Your ones go a bit further. Thanks
What do you mean by the comment - Use 'assume_ssl' at 13:04 Should i modify the code?
keep going bro
Keep it up bro
Eagerly waiting the next video. Can't for the life of me get kamal2 to run with redis.
@@BufordTaylor What problem are you having? Working on a new one now
Same here. running through some problems getting my web app to connect with redis as an accessory
builder: Builder arch not set
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/
@@devscoach yes. it's very confusing starting with kamal2 and finding only kamal1 videos etc in the internet. thanks
@@timvanmonero2720 totally, they changed a lot, I'll get it up soon to help
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?
28 minutes...!
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?
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
@devscoach awesome, thank you for the info. I really appreciate Hope you would make another on kamal 2 soon?
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.
Really helpful! Thanks for sharing!
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.
Finally, thanks!
Need more videos sam :D Checking your account quite often now...
Didn't understand a thing in this video. Could you atleast link the codes you used?
Wow, this is such an amazing tutorial. Thank you so much!
Thank you for a great video! Did you do a video on setting up a read replica with Kamal for postgresql? :)
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
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.
Yeah for a huge project it would end up needing some better organization. Its more to see whats possible.
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.
'promosm'
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!
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
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?
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.
@@devscoach awesome I will check it out. Another question I have , do you work for Basecamp or hey?
@@hendrikmartina3552 Nope, I used to work for Atlassian but now I do Rails consulting
which camera do you use ?
It's my iPhone with continuity mode
who are you, im glad youtube found you :) lol
Exactly what I was looking for! Thanks a lot! ❤
Glad it was helpful!
Super informative, well spoken and very useful video! Subscribed for more!
Thank you for watching!
great video!👍
Thanks for making this! :) Which keyboard are you using, sounds so damn satisfying :)
Moonlander! I used to build my own keyboards but after this I won’t go back
@@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 :))
@@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.
Been banging my head whole last week This was SO SO helpful! Thank you so much!
A gist or a repository would be nice.
Definitely, I'm working on cleaning up the code and adding comments but I will make it public.
@@devscoach is the repo of this video public? thanks nice tutorial.
Excellent content! 👏🏼👏🏼👏🏼
Thanks!
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
Good point! I’ve forgotten to run that before.
Should I dockerize my application before I can use kamal?
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.
@@devscoach thank you for this
We will support by subscribing and learn how to Deploy.