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

Rename some configuration variables - #223

Open
jirutka wants to merge 6 commits into
masterfrom
config
Open

Rename some configuration variables#223
jirutka wants to merge 6 commits into
masterfrom
config

Conversation

@jirutka

@jirutka jirutka commented Jun 28, 2017

Copy link
Copy Markdown
Member

No description provided.

@jnv jnv left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread config/puma.rb Outdated
require './config/config'
environment Config.rack_env
port Config.port
port Config.http_port

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread config/config.rb
# 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
Copy Markdown
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
Copy Markdown
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

jirutka commented Jul 12, 2017

Copy link
Copy Markdown
Member Author

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