Closed rccursach closed 5 years ago
Hi @gjaldon , I've set up a phoenix 1.3.x with dokku to try this.
added this to my .buildpacks:
https://github.com/HashNuke/heroku-buildpack-elixir.git
https://github.com/gjaldon/heroku-buildpack-phoenix-static.git#var-in-release
When using #master
things runs ok because it picks up phx
instead of phoenix
,
but with #var-in-release
I got this:
** (Mix) The task ".server" could not be found. Did you mean "phx.server"?
But this message from lib/common changes accordingly to my .config
file:
Will use phoenix configuration:
* assets path assets
* mix tasks namespace phx
(according to the value of phoenix_ex
inside phoenix_static_buildpack.config
)
It may be a thing of Dokku, when running the release script... let me test it with heroku too.
But maybe is less trouble just to leave the branch that references phoenix
instead of phx
, as a solution. Maybe, there's a minority of apps with phoenix < 1.3.x out there?
UPD: Same with Heroku..
And Dokku:
I think I made the issue because I had already tried to use the var ${phoenix_ex}
back then.. 🤔.
Maybe is no big deal to just have a branch for old apps ? 😆
@rccursach just updated the branch https://github.com/gjaldon/heroku-buildpack-phoenix-static/pull/87. This time, I loaded the config vars inside bin/release
. Can you test it out? :)
it gives this: "mapping values are not allowed in this context at line 4 column 15" :/
With or without a phoenix_static_buildpack.config
. Idk what part of the code is parsing a YAML file though.
The above error happens bc what's echoed by the load_config() is added to the YAML output of release.
it works now in pr #88 for the var-in-release
branch
Addressed in #88
In the readme says:
But, even if I put
phoenix_ex=phx
into myphoenix_static_buildpack.config
file, if im not explicitly creating aProcfile
to runweb: mix phx.server
will default to runphoenix.server
. that confused me for a while...I guess, it's because of the content of
bin/release
:Then I can see in my logs:
app[web.1] mix phoenix.webserver is deprecated. Use phx.server instead.
It's possible to tell the buildpack to catch this
phoenix_ex
value to insert it into the default line? or state this behavior on the cited line of the readme?