From 898e8d591291e194985a01ec24584bbbfb0d33e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Tue, 19 May 2015 11:06:37 +0200 Subject: [PATCH 1/2] Remove deprecated port setting --- config/defaults.yml | 1 - config/diaspora.yml.example | 4 ---- script/server | 9 +-------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/config/defaults.yml b/config/defaults.yml index 9fc684211..dcd103413 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -32,7 +32,6 @@ defaults: host: pubsub_server: 'https://pubsubhubbub.appspot.com/' server: - port: listen: '0.0.0.0:3000' rails_environment: 'development' stderr_log: diff --git a/config/diaspora.yml.example b/config/diaspora.yml.example index 378e0d6d3..6f5558fad 100644 --- a/config/diaspora.yml.example +++ b/config/diaspora.yml.example @@ -145,10 +145,6 @@ configuration: ## Section #listen: 'unix:tmp/diaspora.sock' #listen: 'unix:/run/diaspora/diaspora.sock' - ## The port on which the appserver should listen (default=none). - ## Note: this setting is deprecated, use listen instead. - #port: 3000 - ## Rails environment (default='development'). ## The environment in which the server should be started by default. ## Change this to 'production' if you wish to run a production environment. diff --git a/script/server b/script/server index 466b4ef0f..0144e244f 100755 --- a/script/server +++ b/script/server @@ -103,7 +103,6 @@ fi os=$(uname -s) vars=$(bin/bundle exec ruby ./script/get_config.rb \ - port=server.port \ single_process_mode=environment.single_process_mode? \ embed_sidekiq_worker=server.embed_sidekiq_worker \ workers=server.sidekiq_workers \ @@ -119,12 +118,6 @@ then export DB 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="$@" for arg in $(echo $args | awk '{ for (i = 1; i <= NF; i++) print $i}') do @@ -139,7 +132,7 @@ then services=$(chk_service $PORT) if [ -n "$services" ] then - fatal "Port $port is already in use.\n\t$services" + fatal "Port $PORT is already in use.\n\t$services" fi fi From ebe0c76040e706c0fe73c8bc9673e486134f5d56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonne=20Ha=C3=9F?= Date: Tue, 19 May 2015 11:08:41 +0200 Subject: [PATCH 2/2] Listen to unix socket in production by default --- config/defaults.yml | 2 +- config/diaspora.yml.example | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/defaults.yml b/config/defaults.yml index dcd103413..856319891 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -192,7 +192,7 @@ development: autofollow_on_join: false autofollow_on_join_user: '' production: - i_am_a_dummy: # Remove if you add an actual override + listen: 'unix:tmp/diaspora.sock' test: environment: url: 'http://localhost:9887/' diff --git a/config/diaspora.yml.example b/config/diaspora.yml.example index 6f5558fad..ba11d78e9 100644 --- a/config/diaspora.yml.example +++ b/config/diaspora.yml.example @@ -140,10 +140,10 @@ configuration: ## Section ## Settings affecting how ./script/server behaves. server: ## Section - ## Where the appserver should listen to (default=0.0.0.0:3000) - #listen: '127.0.0.1:3000' + ## Where the appserver should listen to (default=unix:tmp/diaspora.sock) #listen: 'unix:tmp/diaspora.sock' #listen: 'unix:/run/diaspora/diaspora.sock' + #listen: '127.0.0.1:3000' ## Rails environment (default='development'). ## The environment in which the server should be started by default.