• nickjj 9 hours ago

    It's good to see more folks getting exposed to this style of hosting.

    For ~9 years I've been comboing Ansible, Docker Compose and git to deploy web apps to a VPS or more generally any Debian based host. Roughly 10-15 lines of YAML and 1 command to get everything up and running in a production ready way. It really does work, I've deployed about 60 or 70 different apps this way for clients over the years.

    • strzibny 5 hours ago

      Yes and Kamal fixes the small things regarding Compose -- zero downtime deploys, assets bridging, automatic TLS certs, etc. I wrote Kamal Handbook to help people start with Kamal (and currently updating for Kamal 2.0).

      • nickjj 4 hours ago

        With Ansible you can configure anything such as nginx and certbot. That would handle assets and DNS based wild card certs among other things.

        If you were feeling adventurous you could also queue up requests with nginx and a little bit of Lua scripting to achieve zero downtime deploys. That's what Basecamp did 11 years ago with: https://github.com/basecamp/intermission

        In practice I find zero downtime deploys with request queuing can get tricky. For example, it's not just your web app that gets deployed. There's also your background worker and action cable process that runs in its own containers and isn't proxied with the same health check as your web container. I haven't used Kamal yet but how does it deal with your action cable process and background worker becoming healthy with v2 of your app while the web app is still serving v1 of your code or vice versa?

    • mooreds 12 hours ago

      Hmmm. They suggest running SQLite in production rather than PG or MySQL. As a long time RDBMS fan, I'm not sure how I feel about that.

      • tchock23 12 hours ago

        Years ago we used to tease a guy in our incubator about using SQLite in production. Who knew he was just ahead of the curve…

        • strzibny 5 hours ago

          It's just a default that's being in Rails for a very long time. This let's you start a project quickly. And now the improvements to SQLite is Rails means it's also good to go for a production setup.

          • PapaPalpatine 11 hours ago

            They’re not suggesting you use SqLite for your primary database but rather separate databases for caching and job queues. It allows you to drop redis as a dependency.

            • mooreds 10 hours ago

              Ah, thanks for the clarification.