Skip to content

Commit

Permalink
Change default interface of web and streaming from 0.0.0.0 to 127.0.0…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and ClearlyClaire committed Jul 16, 2019
1 parent 5ccd011 commit be05356
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
threads threads_count, threads_count

if ENV['SOCKET']
bind 'unix://' + ENV['SOCKET']
bind "unix://#{ENV['SOCKET']}"
else
port ENV.fetch('PORT') { 3000 }
bind "tcp://127.0.0.1:#{ENV.fetch('PORT', 3000)}"
end

environment ENV.fetch('RAILS_ENV') { 'development' }
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:
image: tootsuite/mastodon
restart: always
env_file: .env.production
command: yarn start
command: BIND=0.0.0.0 node ./streaming
networks:
- external_network
- internal_network
Expand Down
2 changes: 1 addition & 1 deletion streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ const attachServerWithConfig = (server, onSuccess) => {
}
});
} else {
server.listen(+process.env.PORT || 4000, process.env.BIND || '0.0.0.0', () => {
server.listen(+process.env.PORT || 4000, process.env.BIND || '127.0.0.1', () => {
if (onSuccess) {
onSuccess(`${server.address().address}:${server.address().port}`);
}
Expand Down

0 comments on commit be05356

Please sign in to comment.