Merge pull request #5974 from jhass/port_setting
Update listen configuration
This commit is contained in:
commit
fc6de28ee1
3 changed files with 4 additions and 16 deletions
|
|
@ -32,7 +32,6 @@ defaults:
|
||||||
host:
|
host:
|
||||||
pubsub_server: 'https://pubsubhubbub.appspot.com/'
|
pubsub_server: 'https://pubsubhubbub.appspot.com/'
|
||||||
server:
|
server:
|
||||||
port:
|
|
||||||
listen: '0.0.0.0:3000'
|
listen: '0.0.0.0:3000'
|
||||||
rails_environment: 'development'
|
rails_environment: 'development'
|
||||||
stderr_log:
|
stderr_log:
|
||||||
|
|
@ -193,7 +192,7 @@ development:
|
||||||
autofollow_on_join: false
|
autofollow_on_join: false
|
||||||
autofollow_on_join_user: ''
|
autofollow_on_join_user: ''
|
||||||
production:
|
production:
|
||||||
i_am_a_dummy: # Remove if you add an actual override
|
listen: 'unix:tmp/diaspora.sock'
|
||||||
test:
|
test:
|
||||||
environment:
|
environment:
|
||||||
url: 'http://localhost:9887/'
|
url: 'http://localhost:9887/'
|
||||||
|
|
|
||||||
|
|
@ -140,14 +140,10 @@ configuration: ## Section
|
||||||
|
|
||||||
## Settings affecting how ./script/server behaves.
|
## Settings affecting how ./script/server behaves.
|
||||||
server: ## Section
|
server: ## Section
|
||||||
## Where the appserver should listen to (default=0.0.0.0:3000)
|
## Where the appserver should listen to (default=unix:tmp/diaspora.sock)
|
||||||
#listen: '127.0.0.1:3000'
|
|
||||||
#listen: 'unix:tmp/diaspora.sock'
|
#listen: 'unix:tmp/diaspora.sock'
|
||||||
#listen: 'unix:/run/diaspora/diaspora.sock'
|
#listen: 'unix:/run/diaspora/diaspora.sock'
|
||||||
|
#listen: '127.0.0.1:3000'
|
||||||
## The port on which the appserver should listen (default=none).
|
|
||||||
## Note: this setting is deprecated, use listen instead.
|
|
||||||
#port: 3000
|
|
||||||
|
|
||||||
## Rails environment (default='development').
|
## Rails environment (default='development').
|
||||||
## The environment in which the server should be started by default.
|
## The environment in which the server should be started by default.
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,6 @@ fi
|
||||||
|
|
||||||
os=$(uname -s)
|
os=$(uname -s)
|
||||||
vars=$(bin/bundle exec ruby ./script/get_config.rb \
|
vars=$(bin/bundle exec ruby ./script/get_config.rb \
|
||||||
port=server.port \
|
|
||||||
single_process_mode=environment.single_process_mode? \
|
single_process_mode=environment.single_process_mode? \
|
||||||
embed_sidekiq_worker=server.embed_sidekiq_worker \
|
embed_sidekiq_worker=server.embed_sidekiq_worker \
|
||||||
workers=server.sidekiq_workers \
|
workers=server.sidekiq_workers \
|
||||||
|
|
@ -119,12 +118,6 @@ then
|
||||||
export DB
|
export DB
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$PORT" -a -n "$port" ]
|
|
||||||
then
|
|
||||||
warning "Setting port via configuration is deprecated, set listen instead. See the updated config/diaspora.yml.example."
|
|
||||||
PORT="$port"
|
|
||||||
fi
|
|
||||||
|
|
||||||
args="$@"
|
args="$@"
|
||||||
for arg in $(echo $args | awk '{ for (i = 1; i <= NF; i++) print $i}')
|
for arg in $(echo $args | awk '{ for (i = 1; i <= NF; i++) print $i}')
|
||||||
do
|
do
|
||||||
|
|
@ -139,7 +132,7 @@ then
|
||||||
services=$(chk_service $PORT)
|
services=$(chk_service $PORT)
|
||||||
if [ -n "$services" ]
|
if [ -n "$services" ]
|
||||||
then
|
then
|
||||||
fatal "Port $port is already in use.\n\t$services"
|
fatal "Port $PORT is already in use.\n\t$services"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue