woohaaha

woohaaha

Example Dockerfile for Phoenix umbrella using Elixir 1.9 Releases

Fair warning, I’m a n00b to everything that is Elixir and Docker (so of course I want to do both at once, but let’s ignore that for a sec).

I would like to practice deploys with a Phoenix umbrella and Docker to a cloud platform like AWS or GCP. I have been using this as a base Dockerfile (https://hexdocs.pm/phoenix/releases.html#containers) and expanding/adding to it. It’s starting to get pretty hacky as I don’t consider myself a Docker expert and I have to overcome errors with every new step in the build process.

There are examples of Dockerfiles for Phoenix umbrellas but they don’t use the new Elixir 1.9 releases.

Are there any examples anywhere of a production ready (explaining DATABASE_URL, SECRET_KEY_BASE, etc…) Dockerfile for a Phoenix umbrella (with app_name/assets, not just api)? Also, it would be great if there was an explanation around each step discussing why this step is needed.

Thank you :pray:

PS: reading through the forum it seems there’s a lot of discussion around deployment, it would be great if there was more consensus around the topic, or at least some templates to get us n00bs started. Maybe deployment scripts for some common/popular scenarios. Every deploy is different but it would be nice if there was a stock (it just works) example that people can begin to learn from.

PPS: when a n00b gets an answer that’s along the lines of “it depends” it becomes a blocker. Opinions are great! I’d love to hear more of them :sweat_smile:

Most Liked

christopherlai

christopherlai

I have a pretty simple setup for my umbrella project.

Dockerfile:

mix.exs:

You will actually have to move the SecretsManagerProvider dep into one of the applications under apps, whichever one you’re building the release for.

I use SecretsManagerProvider to load all of my runtime configurations from AWS Secrets Manager.

Where Next?

Popular in Questions Top

siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement