One misstep IRL, taught me CI/CD and modern container based app hosting

29 September 2022

The last blog post I mentioned how an injury led me to staying at home forcing me to learn a lot of frameworks. Injury has been healed, CI/CD has been learnt.

After creating my new website, and exploring possibilities of hosting static site generated websites, I further explored Remix and free-tier capabilities of fly.io. Created a remix app with a postgres database and hosted it on fly.io . But most of the lessons were learnt while creating a remix app which uses sqlite database. The most important reason to learn it was how to create a Remix app which uses Prisma, which will make it fully typesafe from front-end to database. The other motivations include testing platforms which can auto-scale. Along the way learnt most of the gotchas of pnpm, and how its directory structure plays with prisma's default configuration. The default Dockerfile from the Remix docs doesn't go well while using Prisma. Which led me to learn more deeply how Dockerfile works, and also got to know docker's new build enhancements called BuiltKit . It is an amazing improvement, that will greatly improve the docker experience.

Thank you so much fly.io , for providing such a rich platform and exposing access to all of the functionality in the free tier. So awesome that docker BuildKit caching also works. The other reason for choosing the stack was that fly.io free tier also includes persistent storage. The other platforms I checked were Render and Railway . The already existing docker file never worked on Railway, Render does not have persistent storage in the free-tier. Anyway the final thought is that these platforms are not worth the price for the projects that I might stumble upon my freelance career. In the end its better for me to just stick to VPS hosting as most of my clients are very cheap and would prefer fixed hosting fees.