Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Absolute path incompatibility with negativetwelve/heroku-buildpack-subdir #130

Closed
cyrilchapon opened this issue Mar 7, 2019 · 2 comments

Comments

@cyrilchapon
Copy link

cyrilchapon commented Mar 7, 2019

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] > [email protected] 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
@cyrilchapon
Copy link
Author

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

@edmorley
Copy link
Member

edmorley commented Jun 9, 2022

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.

@edmorley edmorley closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants