Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Rename some configuration variables #223

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Rename some configuration variables #223

wants to merge 6 commits into from

Conversation

jirutka
Copy link
Member

@jirutka jirutka commented Jun 28, 2017

No description provided.

Copy link
Contributor

@jnv jnv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree in general with the PR, except of changing PORT to HTTP_PORT since it breaks implicit compatibility with Foreman.

I am okay with renaming the variable as long Foreman works. We can pass port from Procfile to Puma through -p $PORT argument, but that will be overriden by the config file – so there needs to be some check that the port was given externally via CLI.

config/puma.rb Outdated
@@ -1,6 +1,6 @@
require './config/config'
environment Config.rack_env
port Config.port
port Config.http_port
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$PORT is a special env variable handled by Foreman, so this is a breaking change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I’ve removed this change.

@@ -26,22 +26,22 @@ module Config

# Override -- value is returned or the set default.
override :database_timeout, 10, int
override :db_pool, 5, int
override :db_pool_max_size, 3, int
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any explanation for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use 3 on production for a long time, because 5 is too many – this value is per process and Puma spawns multiple processes.

@jirutka
Copy link
Member Author

jirutka commented Jul 12, 2017

I’ve rebased against master and removed rename of port variable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants