Below you will find pages that utilize the taxonomy term “phoenix”
Posts
Running Quantum in an Elixir Cluster
In one of the projects that I work on, for the sake of availability and reliability, we are running our Phoenix app in a cluster of 3 servers using libcluster. Initially, it was just running on a single server and I had configured Quantum to run our recurring tasks on a cron like schedule. This worked well, and I had no issues with the setup. When we decided to move to a clustered setup, there was a consideration concerning Quantum.
Posts
Ecto Preload Nested Associations with joins
Recently I had an issue where I was loading some “models” in ecto, and I needed to preload some of the associations along with the parent record. I had it working with a very simple bit of code.
def get_franchises do Franchise |> preload(merchants: [stores: :shopify]) |> Repo.all() end As you can see from this bit of code, some of the associations were nested, Franchise has many Merchants, Merchants have many stores, and a store can have a Shopify record.
Posts
Heroku Git Transport Feature Retirement
We recently received an email from Heroku telling us that we would need to transition our deployments away from the ssh transport that we’ve been using on Semaphore CI to deploy our Elixir Phoenix app. The Semaphore deployment documentation only covers the ssh transport route. We needed to figure out how to move to the https deployments from our CI server. The instructions in the email were’t too helpful as those steps had already been taken in our project, the Semaphore solution replaces https with ssh for deployments.
Posts
Add Sass to Phoenix 1.6 with Esbuild
If you are starting a new project with The Phoenix Framework version 1.6, you’ll notice there has been a change with regard to asset handling. Chris McCord and The Phoenix Team have made the choice to move away from WebPack and start using Esbuild to deal with the Javascript files. One side effect of this is you lose the ability to use Sass files by default. Have no fear, there’s a way to add Sass back into your project.