How to Deploy a Phoenix App with Clustering on Nomad

259
clicks
How to Deploy a Phoenix App with Clustering on Nomad
Theron's post provides a step-by-step guide on running a Phoenix application on a Nomad cluster, with rolling deployments and clustering for redundancy setup. The assumption is that there's an existing setup of PostgreSQL and a Nomad and Consul cluster. The guide discourages the use of Docker for Mac or Windows and suggests Linux for a smoother experience. Theron stresses on the importance of the `ecto_boot_migration` for automating migrations on server startup. The main steps include Dockerizing the Phoenix app and pushing it to Github Container Registry, creating and running a Nomad job, setting up the load balancer using Traefik configured with Consul, and finally being able to perform rolling updates on the app without downtime. The benefits of this setup are the seamless addition of rolling deployments and automatic node management using Traefik with Consul.

© HashMerge 2024