Absolute path incompatibility with negativetwelve/heroku-buildpack-subdir
cyrilchapon opened this issue · comments
Hey,
Thank you for this fantastic buildpack ❤️
heroku-buildpack-static is currently the simplest way to achieve some multi-apps proxying / serving inside a single Heroku app, that I found. The fact it abstracts the god damned nginx configuration file is a real plus for sake of simplicity and maintenability, and it has a bunch of great features we need.
negativetwelve/heroku-buildpack-subdir on its side, is the most starred / deployed buildpack that is able to run other buildpacks inside sub-directories.
The fact is, negativetwelve/heroku-buildpack-subdir entirely rely on the ability of the subsequent buildpacks to run in isolation...
We recently decided to migrate from a nginx-buildpack to heroku-buildpack-static, and we discovered that the latter is not able to run through negativetwelve/heroku-buildpack-subdir
The error we got is :
2019-03-07T14:39:16.043418+00:00 app[web.1]: [2] > MY_APP@1.0.0 start:proxy /app
2019-03-07T14:39:16.043420+00:00 app[web.1]: [2] > cd reverse-proxy && bin/boot
2019-03-07T14:39:16.043421+00:00 app[web.1]: [2]
2019-03-07T14:39:16.227829+00:00 app[web.1]: [2] Starting log redirection...
2019-03-07T14:39:16.228399+00:00 app[web.1]: [2] Starting nginx...
2019-03-07T14:39:16.235762+00:00 app[web.1]: [2] nginx: [emerg] mrb_file(/app/bin/config/lib/ngx_mruby/headers.rb) open failed in ./config/nginx.conf:47
2019-03-07T14:39:16.236774+00:00 app[web.1]: [2] Process exited unexpectedly: nginx
2019-03-07T14:39:16.237101+00:00 app[web.1]: [2] Going down, terminating child processes...
I just dug a little into it, and found that some paths are absolutely set inside nginx.conf.erb template here and here.
I thought of 2 ways this could fix it and be compliant with negativetwelve/heroku-buildpack-subdir's strategy :
- Make that path relative regarding nginx.conf.erb own position
- Make that path absolute with
$build_dir
or another prefix
I'd like to start with forking the repo, fixing it and testing on my fork during several weeks, then come back.
Unfortunately, I'm neither a shell nor a ruby ninja, and I'd like some quick help about this.
Anyone ? :)
Thanks again
Hi
This buildpack is now deprecated and we are recommending people move the more actively maintained heroku-buildpack-nginx. For migration advice see here.
As such, I'm closing this issue out since we won't be making further changes to this buildpack.