heroku / heroku-buildpack-nginx

Run NGINX in a Heroku app
244 stars 787 forks source link

cant start with puma #87

Open AndyGao23 opened 3 years ago

AndyGao23 commented 3 years ago

Procfile web: bin/nginx -p . -c config/nginx.conf & bundle exec puma -C config/puma.rb worker: bundle exec sidekiqswarm -C config/sidekiq.yml

beanieboi commented 3 years ago

please have a look at our documentation: https://github.com/heroku/heroku-buildpack-nginx#languageapp-server-agnostic

AndyGao23 commented 3 years ago

It works good with unicorn and i just want to figure out the way to start with puma.

And I didn't find the nginx.conf file in heroku bash

please have a look at our documentation: https://github.com/heroku/heroku-buildpack-nginx#languageapp-server-agnostic

DiegoSPB commented 1 year ago

Also having issues making it work with puma, it seems that /tmp/app-initialized is never touched because keep getting nonstop:

2022..: buildpack=nginx at=app-initialization
2022... buildpack=nginx at=app-initialization

added to puma.rb

before_fork do
  FileUtils.touch('/tmp/app-initialized')
end

Procfile

web: bin/start-nginx-debug bundle exec puma -C config/puma.rb

and I do get the initial log of:

buildpack=nginx at=start-app cmd=bundle exec puma -C config/puma.rb

Maybe its an issue between heroku/puma but asking here in case someone figured it out.

DiegoSPB commented 1 year ago

haven't been able to trigger the touch from puma but was able to make it work by adding to application.rb

  config.after_initialize do
    FileUtils.touch('/tmp/app-initialized')
  end