This is a guide for serving your Phoenix project and setting up a continuous integration/deployment pipeline. The goal is to have an automated process to run your tests when you push to GitHub, and deploy the project to a production server if they pass.
In this guide, you will learn to:
I've organized the steps in this guide into small bite-sized sections. The sections are grouped into chapters. This is my first attempt at GitBook (I like it!) and I think this format is going to work well for most readers. You can use the left/right arrow keys to move around.
You should read the chapters/sections in the guide in order. Many sections depend on certain things covered earlier being in place.
Please let me know if you find the format or language of this guide better/worse compared to other tutorials/how-tos you have read. Start a discussion or leave in-line comments.
You will needs servers (obviously); at least 2, possibly 3 if you want a separate staging server. I use Linode, but any VM solution will do. Please report any issues you run into with other providers.
The deployment process involves building a fresh exrm release of your project (as opposed to an upgrade). This means live updates are not supported as the running project must be restarted. I am working on a way to do hot upgrades, and will update this guide when I'm done.
I use Phoenix as a backend for apps that I write using Ember.js. Accordingly, I don't serve any static assets with Phoenix. If you need to compile and serve static assets, you will have to modify the nginx configs and the build commands presented here.
Get started by creating a Phoenix Project. Right arrow!