Skip to content
Permalink
Browse files

Change default interface of web and streaming from 0.0.0.0 to 127.0.0…

….1 (#11302)
  • Loading branch information...
Gargron committed Jul 15, 2019
1 parent 2f813b7 commit e7353c47dbc200536dedb7beea37d60c6ea6fa2f
Showing with 4 additions and 4 deletions.
  1. +2 −2 config/puma.rb
  2. +1 −1 docker-compose.yml
  3. +1 −1 streaming/index.js
@@ -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' }
@@ -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
@@ -672,7 +672,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}`);
}

0 comments on commit e7353c4

Please sign in to comment.
You can’t perform that action at this time.