Closed tt closed 10 years ago
Rad! Thanks for the PR.
Did you build NGINX using this script?
I did. Not exactly as advertised, although that shouldn't matter; got a one-off dyno and uploaded it from there so I didn't have to deal with setting up another web server that would serve it.
I see. Is that a better approach? Should we change the script? Did you notice that the script started a python web server?
No, I think the current approach is better. I just misread it and thought I had to wrap it. Using the null buildpack and downloading directly is definitely less work.
Just for reference, this is the ldd
output from a "cedar-14" dyno:
$ ldd bin/nginx-cedar
linux-vdso.so.1 => (0x00007fff6bb58000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f589b614000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f589b3db000)
libcrypto.so.0.9.8 => not found
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f589b1c1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f589adfb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f589b83c000)
$ ldd bin/nginx-cedar-14
linux-vdso.so.1 => (0x00007fff98ef9000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff2a6069000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007ff2a5e30000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007ff2a5a55000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff2a583c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff2a5476000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff2a6291000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff2a5271000)
Anything you need, @ryandotsmith?
OK. Last questions.... I think.
Is the $STACK
variable documented somewhere? I did a quick google search and was unable to find anything useful.
A
STACK
environment variable is available to the compile script. The value of theSTACK
variable is the stack of the app that the slug is being built for, i.e.cedar
orcedar-14
(Bamboo apps don't use buildpacks). Buildpacks should use theSTACK
variable to selectively pull binaries and other dependencies appropriate for that stack. Builds are always done inside a dyno running on the same stack as the app that the build is running for.
thanks!
This adds support for Heroku's new stack: nginx needs to link different library versions, so a binary is vendored per stack.