OK, I created a Phoenix application (after reading numerous books), now how do I deploy it?

Note: Please read the question and details, and think about it before reading any of the replies.

There are numerous resources (books, video tutorials/courses, blog-posts etc) which will teach a complete noob how to create a web application based on Phoenix from start to finish, but there is no single resource which will teach her to deploy that same application (in a way as if it’s taught to a 5 / 6 years old).

I had high hopes from the book Designing Elixir Systems with OTP, but when I read its contents, it doesn’t teach how to actually deploy the SCALABLE application you created after reading that book, and I think nobody designs a SCALABLE application just to keep it in her harddisk and brag about it in front of her friends.

Is there any book which will teach me how to deploy an Elixir / Phoenix application in a way as if Jose or Chris is deploying himself or someone from Plataformatec or DockYard in the best scalable way on a group of bare-metal servers rented at Hetzner or a cluster of VPS instances from DO, Linode (again) Hetzner or other cheap (but reliable) host?
I checked Rails community have some nice books (and some dedicated coruses) on this topic which teacher a noob how to deploy a Rails application to a VPS (with and without Docker/Kubernetes etc) she just created.

1 Like

This link should help you to deploy your application to digital ocean https://www.digitalocean.com/community/tutorials/how-to-deploy-elixir-phoenix-applications-with-mysql-on-ubuntu-16-04

Fair warning never used before, but the documentation in DO(digital ocean ) is usually very accurate.

Also if you find it hard to understand the terms then you should learn some basic Linux. I would recommend ubuntu because it is easy.

Good luck


Even though I didn’t read this specific tutorial yet (I bookmarked it to read it later), but as many tutorials I read teaches to deploy Phoenix applications as if you’re deploying some CodeIgniter or Laravel application on a single instance as if you’re expecting 10 users per day.
A side note: I won’t prefer digital ocean for any serious application after reading this Twitter thread, https://twitter.com/w3Nicolas/status/1134529316904153089

Please then specify your requirements:

Ex: I want to deploy my phoenix application in a docker container.

If you provide this details it will be a lot easier to get help from others and also from me.

1 Like

I meant resources (detailed books) like the following (for Rails),

Reliably Deploying Rails Applications
Deploying with JRuby 9k
Docker for Rails Developers
Deploying Rails, Automate, Deploy, Scale, Maintain, and Sleep at Night (2012)

It doesn’t mean that Rails developers are completely clueless about Linux and other stuff, but it’s always great to have resources like that because not everyone wants to deploy applications to AWS etc, and there are many people who’ll want to take the full advantage of Elixir and OTP’s strengths by deploying their applications to bare-metal servers and / or dedicated VPSes.
thank you for the replies!

This thread has something similar to what are you looking for I'm looking for a book on Phoenix hosting/deployment

Also this redit https://www.reddit.com/r/elixir/comments/7pl5i7/how_did_you_learn_to_deploy_elixir_phoenix/

Have you read this book https://www.oreilly.com/library/view/phoenix-web-development/9781787284197/?


There have been several ElixirConf talks about this which would probably answer most of your questions … I like this one in particular: Tian Chen - Release, Deploy, Monitor and Upgrade Elixir Services in Real World - Code BEAM SF 2018


Have a look at render.com – I don‘t think it could get much easier: Render.com for simple deployment


That talk is helpful if you know over half of the things he is talking about.

I think the OP is right – written documentation about deployment is scarce, and I have also noticed that, but thought maybe I did not search hard enough.

Ideally, such documentation would answer the following questions:

  • What options do I have to release software?
  • What is considered good practice, and which approaches are bad or even dangerous, and why?
  • What if I want to deploy without docker, ansible, chef or something? You know, the least-tools-possible-learn-everything-unix-shell way?

I hope for the 1.9.0 release feature to standardize things, but have not found blog posts yet.

And as a last nitpick, and that is purely my taste: “There is no written documentation, but in this two-hour youtube video, maybe there are ten minutes about what you need” frustrates me to no end.

(Clarification: No one has said this quite in that way in this forum, and I am not aiming for provocation. I want to emphasize what is not helpful to me, personally. Youtube videos are probably better than nothing at all for many people.)

1 Like

Maybe https://github.com/syfgkjasdkn/elixir-cd-demo/blob/master/.semaphore/deploy.yml this would be helpful (I used it to deploy from a CI to a ec2 vm without using any extra tools).

Thanks for replying.

Hopefully some day we will have official, standardized documentation which explains it all. I mean, not only what you can do, but what you should (and more importantly should not) do.

I’ve used the digital ocean article you used and it has worked for me.

1 Like

I am glad it worked for you