Skip to content

Commit

Permalink
Remove automatic setting of the DB variable from script/server
Browse files Browse the repository at this point in the history
* It's broken for those that would benefit from it (postgres users)
* It's broken in the design: Reading it from the config requires bundle exec ruby, which requires it being set properly
  • Loading branch information
jhass committed Sep 1, 2013
1 parent 0cdfc7c commit 58e8df4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion config/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ defaults:
rails_environment: 'development'
stderr_log:
stdout_log:
database: 'mysql'
unicorn_worker: 2
unicorn_timeout: 90
embed_sidekiq_worker: false
Expand Down
4 changes: 0 additions & 4 deletions config/diaspora.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,6 @@ configuration: ## Section
#stderr_log: '/usr/local/app/diaspora/log/unicorn-stderr.log'
#stdout_log: '/usr/local/app/diaspora/log/unicorn-stdout.log'

## The database type the server should use by default.
## Valid choices are 'mysql' and 'postgres'
#database: 'mysql'

## Number of Unicorn worker processes, increase this if
## you have many users
#unicorn_worker: 2
Expand Down
4 changes: 1 addition & 3 deletions script/server
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,15 @@ fi
os=$(uname -s)
vars=$(bundle exec ruby ./script/get_config.rb \
port=server.port \
db=server.database \
single_process_mode=environment.single_process_mode? \
embed_sidekiq_worker=server.embed_sidekiq_worker \
workers=server.sidekiq_workers
)
on_failure "Couldn't parse config/diaspora.yml!"
eval "$vars"

if [ -z "$DB" ]
if [ -n "$DB" ]
then
DB=$db
export DB
fi

Expand Down

0 comments on commit 58e8df4

Please sign in to comment.