wallyfoo

wallyfoo

Phoenix 1.5, Heroku, Dokku, and Node sadness

I spent most of a day trying to deploy a new Phoenix app (and an umbrella application) via dokku to my test server.

All the deployments fail on the node assets fetching stage. It seems that the heroku phoenix static buildfile that’s the de facto build for Phoenix requires a version of node that is incompatible with a number of packages Phoenix 1.5 wants to build. (Many, many of them are looking for a minimum of 8 or 10, and the build file wants to provide Node 5.something.)

Setting the version of node higher in a build config file fails for other reasons. I’ve checked the git issues for the static build file, and a related error is there, but no fix has been offered.

My question is, has anyone had any luck deploying Phoenix 1.5 to Heroku/Dokku? If so, how did you manage it?

If not, what’s your preferred deployment solution because I’m really digging on 1.5, but my deployment pipeline for simple one-off projects seems to have just collapsed.

Marked As Solved

outlog

outlog

have you added the phoenix_static_buildpack? and made sure they are in correct order.. then Deploying on Heroku — Phoenix v1.8.8 for setting node version..

Also Liked

wallyfoo

wallyfoo

I started over. Wiped out my dokku installation, re-initialized my phoenix 1.5 application. Somewhere while tweaking the configuration for the umbrella app, I must have done something incorrectly, because it seems to work now. Going to try the same for a plain vanilla phoenix application.

jswny

jswny

I used to use Heroku but it got too expensive for running a few personal apps. I also tried Dokku but it was more complicated than I expected and I couldn’t get it setup right.

I ended up going with a very simple solution; using some SSH scripts to deploy my apps. It’s not the prettiest, but it works quite well. I have it working on a few apps. My solution is here if you are interested: GitHub - jswny/sad: Simple app deployment using only SSH and Docker. · GitHub. Basically, you have the CI build the Docker image, push it to Docker hub, and then just SSH into the remote server copying over your Docker Compose file, which pulls down the new image and runs docker-compose up. That repository has a few extra environment variable handling niceties which I use to configure the apps based on their release channel, so it also copies over a .env populated with the right environment variables for your apps.

wallyfoo

wallyfoo

Thanks for the suggestion, outlog. I double-checked, and yes, I’m loading in the correct order and I do have the node version set correctly in the phoenix_static_buildpack.config.

It’s possible I misconfigured something else. I’m probably going to just rebuild the VM from the ground up and try again from scratch to see what, if anything, I missed.

Where Next?

Popular in Questions Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
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
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
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
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement