Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind servers to 0.0.0.0 in Procfile #11378

Merged
merged 2 commits into from Jul 22, 2019

Conversation

@zunda
Copy link
Collaborator

commented Jul 22, 2019

Following #11302 and #11326, this change makes it easier to deploy Mastodon as a Heroku app.

The second line is to be used for a separate app to receive streaming requests.

@zunda zunda referenced this pull request Jul 22, 2019

Closed

Bind to 0.0.0.0 #25

Procfile Outdated
@@ -1,2 +1,3 @@
web: bundle exec puma -C config/puma.rb
web: BIND=0.0.0.0 bundle exec puma -C config/puma.rb
#web: BIND=0.0.0.0 node ./streaming # for streaming app

This comment has been minimized.

Copy link
@Gargron

Gargron Jul 22, 2019

Member

Why commented out, and why not call it "streaming"?

This comment has been minimized.

Copy link
@zunda

zunda Jul 22, 2019

Author Collaborator

Heroku only routes requests from the Internet at ports 80 or 443 to "web" dynos.

To run the streaming server on Heroku, a separate app that shares Postgres and Redis with the main app is needed. On that app, the node process needs to run on "web" dynos.

This comment has been minimized.

Copy link
@Gargron

Gargron Jul 22, 2019

Member

Okay. I would format it like this:

web: BIND=0.0.0.0 bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq

# For the streaming API, you need a separate app that shares Postgres and Redis with
# the main one, and runs this dyno:
# web: BIND=0.0.0.0 node ./streaming 

This comment has been minimized.

Copy link
@zunda

zunda Jul 22, 2019

Author Collaborator

I pushed d7d15d4 so that the admin doesn't have to edit the Procfile. How does this look to you?

@zunda

This comment has been minimized.

Copy link
Collaborator Author

commented Jul 22, 2019

@Gargron Gargron merged commit 00fc17b into tootsuite:master Jul 22, 2019

2 checks passed

build-and-test Workflow: build-and-test
Details
codeclimate All good!
Details

Gargron added a commit that referenced this pull request Aug 9, 2019

Bind servers to 0.0.0.0 in Procfile (#11378)
* Bind to 0.0.0.0

* Make Procfile common to main and streaming apps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.