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
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
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
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
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









