Deployment to ECS without generating a release - is this ok?

I have been developing applications in Elixir and Phoenix for about two years now. From the very first application I wrote in Elixir I followed the strategy of creating releases and deploying them. Recently I came across a micro service created in Phoenix which is deployed to Amazon ECS which lets you run containerised applications in production but the micro service is not bundled in a release using exrm or distillery.

I would like to get some thoughts here wether this is ok when it comes to deploy Phoenix applications to run in docker containers for production without generating a release or for production / staging environments it is an absolute must to generate a release ?

Running mix In the container works fine. You can get the image size down to ~30 MB if you use releases and alpine, but I’ve shipped 800MB ubuntu containers with mix and all source code to ECS without any issues.

In Elixir 1.7 it sounds like mix will handle release generation for you, so no matter which way you go today, there will probably be new “best practices” coming in the next year anyway.

1 Like

I don’t think you’ll see any benefits from not using Releases :wink:

Fortunately, it’s not very difficult to create a Release. I’ve written two blog posts about creating Releases and deploying them using Docker. Maybe you’ll find them helpful:

https://medium.com/@pentacent/getting-started-with-elixir-docker-982e2a16213c

3 Likes

We run a bunch of microservices on ECS and we use releases. There are too many advantages of using releases, the most important of the being the ability to attach to a remote_console and debug productions apps through iex. The way we do this is by building a docker image containing the release and pushing it to AWS ECR. For deployment we just update the task definitions with the latest image’s tasks. It has been working out very nicely for us.

1 Like