Skip to content

Commit

Permalink
Bind servers to 0.0.0.0 in Procfile (mastodon#11378)
Browse files Browse the repository at this point in the history
* Bind to 0.0.0.0

* Make Procfile common to main and streaming apps
  • Loading branch information
zunda authored and hiyuki2578 committed Oct 2, 2019
1 parent e38f92f commit ce93707
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
web: bundle exec puma -C config/puma.rb
web: if [ "$RUN_STREAMING" != "true" ]; then BIND=0.0.0.0 bundle exec puma -C config/puma.rb; else BIND=0.0.0.0 node ./streaming; fi
worker: bundle exec sidekiq

# For the streaming API, you need a separate app that shares Postgres and Redis:
#
# heroku create
# heroku buildpacks:add heroku/nodejs
# heroku config:set RUN_STREAMING=true
# heroku addons:attach <main-app>::DATABASE
# heroku addons:attach <main-app>::REDIS
#
# and let the main app use the separate app:
#
# heroku config:set STREAMING_API_BASE_URL=wss://<streaming-app>.herokuapp.com -a <main-app>

0 comments on commit ce93707

Please sign in to comment.