johninvictus
I have followed this tutorial A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3. · GitHub
successifully but I have no idea how to deploy the result container to digital ocean.
Please help.
Trending in Questions
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
Hello,
I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind.
However, when I launch mix phx.server, I get an error...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
I’m working on a small exercise involving update_in/3, and I came up with this solution:
data = %{
name: "Periodic Table",
category:...
New
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication):
toke...
New
Is there any way to avoid the Hologram compiler running when using iex? It seems like the front-end code could potentially be disregarded...
New
** (ArgumentError) expected :max_attempts to be a positive integer, got: {:@, [line: 10, column: 19], [{:max_attempts, [line: 10, column:...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Most Liked- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
Exadra37
Using Ubuntu or any other normal Linux distro is not the best approach, once you are running containers you want to use an Operating system specific for that… I said CoreOS because is very easy to deploy in Digitall Ocean.
Another alternative is to use SmarOS but not sure id Digital Ocean has already templates to build droplets for it.
Doing this just for fun is ok, but for real production use cases should be avoided.
I definitely will read you approach and try to see in what differs from mine so that I can learn and improve my knowledge about build Elixir releases.
My Current Approach
When developing in Elixir I use a 100% Docker workflow with this Elixir Docker Stack.
When I want to deploy to my server I just build the release with this Docker Image in my laptop and then I push the Docker Image to the Gitlab private registry for containers. Afterwards in my CoreOs server I just use a Docker Compose file to run the Elixir App with volumes mapping to the host for secrets and persistence.
By now this Elixir Docker Stack is a work in progress and my releases are not for real production use cases, they are just for fun and learning purposes.
My Future Approach
My future goal is to build and release from a Gitlab CI pipeline using the Gitlab Container Registry and maybe their Auto DevOps workflow that will include the use of Kubernetes.
For now my priority is to learn to properly code in Elixir and leverage the OTP way of doing things, thus I will leave this approach of auto deployments for later, but I am keening to learn more about deploying Elixir Apps, thus I hope that more developers jump in and share their way of doing it.
Exadra37
Try to create a droplet with CoreOS template in Digital Ocean.
CoreOS is a specialised Operating System to run containers, thus Docker is supported out of the box.
I have note read the gist, thus I cannot tell you exactly the docker command, but if the gist has it than you should only need to run it on the droplet shell. This assumes that the Gist tells how to create the docker image and how to upload it to a private registry.
If not you can always use the Gitlab private registry for containers Introducing GitLab Container Registry and if you want to go further you can use their Auto DevOps for automated deployments as per https://docs.gitlab.com/ee/topics/autodevops.
jswny
Hi, author of the tutorial here, glad you enjoyed the guide! I actually use this strategy on my own $20 DigitalOcean droplet. If you have a lower tier droplet, you might not be able to build the release on the server since Distillery needs a fair bit of memory to build. That is why the guide specifically allows building the release on your development (local) machine and then running the resulting release on the actual deployment machine.
So, you have two options:
Either way, I didl’t really write up anything on moving the actual resulting container/image to your droplet. That’s probably possible, but I’m not well versed in it.
The way I do it is that I just build the release and immediately run it on the droplet itself because mine can handle it. So, I just
git pullthe code onto the droplet, runbuild.shto build the release (a tarball will be generated in the_buildfolder), and then rundocker-compose upto run your app! Basically, that’s how iI do it and it looks like that’s what you tried also. Really, its fine for a basic setup. Again, Docker definitely has ways of pushing the built image up from your dev machine and then pulling it down onto the droplet to deploy it, but I haven’t looked into it much yet.Let me know if you have any questions!
Last Post!
Exadra37
No I don’t… Kubernetes is still a goal to achieve in my DevOps aspirations
I believe that for Elixir/Erlang the use of Kubernetes may not be the best solution for the majority of us that do not have large applications and that current solutions in the OTP ecosystem will suffix. After all the BEAM supports much more workload, in orders of magnitude, than other traditional VMs, thus delaying the need for complex deployment systems