Nginx-buildpack vendors NGINX inside a dyno and connects NGINX to an app server via UNIX domain sockets.
/tmp/app-initializedwhen you are ready for traffic.
Nginx-buildpack provides a command named
bin/start-nginx this command takes another command as an argument. You must pass your app server's startup command to
For example, to get NGINX and Unicorn up and running:
$ cat Procfile web: bin/start-nginx bundle exec unicorn -c config/unicorn.rb
You can configure NGINX's
worker_processes directive via the
NGINX_WORKERS environment variable.
For example, to set your
NGINX_WORKERS to 8 on a PX dyno:
$ heroku config:set NGINX_WORKERS=8
You can provide your own NGINX config by creating a file named
nginx.conf.erb in the config directory of your app. Start by copying the buildpack's default config file.
Copy the snippet above into CLI.