JoeZMar

JoeZMar

I am trying to deploy my first Phoenix app to a Digital Ocean droplet. My local machine is a Mac running Unix and the Digital Ocean droplet is Ubuntu 16.04.

I have been following this guide

I can make it all the way through step 7 where it actually deploys using edeliver and distillery. I build the release on my local machine. I can transfer the release to the production server with:

mix edeliver deploy release to production

It tells me my release was deployed to production so I run:

mix edeliver start production

which it tells me it starts. I have my app configured to port 4000 so when I visit http://example.com:4000 with example being my site domain or ip-address it refuses the connection. So I open my Ubuntu server and see if there is anything running on port 4000 using

lsof -i :4000

and there is nothing running on that port. I don’t even know where to begin to troubleshoot anymore because I’m not running into any errors going through this tutorial. I thought it might be the firewall so i added 4000 to be allowed within ufw.

I wanted to avoid using a service like Heroku or gigalixir, but I am getting ready to throw in the towel for now and just switch. Is there a decent tutorial on how to deploy without having to use Docker or Heroku?

Showing Posts 1 to 4

Most

Most

I followed that tutorial and managed to get my site up but it took me a few days to figure it out. I had a hard time because I’m not very familiar with the devops part of stuff like nginx. It also was annoying because it costs money every month even for the smallest droplet and for a hobby or new app that you are just trying to get deployed it’s not worth it in my opinion.

Either way, when it came to troubleshooting I remember there were logs being saved somewhere on the server that you should be able to pull up about your app and it’ll give you some clues. These were erlang logs I think. I wish I could be more specific but It’s been a while.

The fastest route to deployment has been heroku in my experience. But after trying to internalize the “phoenix is not your app” mantra and get a better handle on what it means to leverage OTP, it’s hard to justify using Heroku since it has to reset its dynos daily, effectively killing any long-running processes.

My most recent project I decided to try gigalixir which I have to say so far, I am thoroughly impressed. Amazing documentation. Insane customer service! You get hot code upgrades and all that stuff baked in. And the free tier is sufficient for most hobby apps.

NobbZ

NobbZ

You should build your release on a machine that runs the same operating system in the same version with the same library versions.

Since you said your local machine is a Mac and your remote is a Ubuntu, you should either build on the target (which I’d not recommend) or in a Ubuntu 16.04 VM on your Mac.

JoeZMar

JoeZMar OP

I thought that was the case. I think I might take @Most’s advice and try gigalixir.

jakemorrison

jakemorrison

Try this template: GitHub - cogini/elixir-deploy-template: An example project for deploying Elixir · GitHub
It is a step-by-step process for building and deploying a Phoenix app using Ansible.
I have been testing it on a Digital Ocean droplet with CentOS 7, Ubuntu 16.04 and 18.04.

I am preparing it as part of this guide:

Please give me your feedback / questions.

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
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
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
achenet
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
bradley
I really like the adapter patterns that ecto, nebulex, waffle, etc. use and would love find something similar for a key management servic...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
Alvinkariuki
How Can I Optimise Compile Time Dependencies I have been building an elixir application for about 2 years now. Many modules and files ha...
New

Other Trending Topics Top

GenericJam
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
budgie
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
KristerV
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
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews