mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add a semantic CLI option for no config file (#2689)
This commit is contained in:
parent
3c5d12db6b
commit
3b2eb69d86
2 changed files with 10 additions and 1 deletions
|
@ -272,9 +272,13 @@ $ puma -C /path/to/config
|
|||
|
||||
If no configuration file is specified, Puma will look for a configuration file at `config/puma.rb`. If an environment is specified, either via the `-e` and `--environment` flags, or through the `RACK_ENV` or the `RAILS_ENV` environment variables, Puma first looks for configuration at `config/puma/<environment_name>.rb`, and then falls back to `config/puma.rb`.
|
||||
|
||||
If you want to prevent Puma from looking for a configuration file in those locations, provide a dash as the argument to the `-C` (or `--config`) flag:
|
||||
If you want to prevent Puma from looking for a configuration file in those locations, include the `--no-config` flag:
|
||||
|
||||
```
|
||||
$ puma -C --no-config
|
||||
|
||||
# or
|
||||
|
||||
$ puma -C "-"
|
||||
```
|
||||
|
||||
|
|
|
@ -112,6 +112,11 @@ module Puma
|
|||
file_config.load arg
|
||||
end
|
||||
|
||||
# Identical to supplying --config "-", but more semantic
|
||||
o.on "--no-config", "Prevent Puma from searching for a config file" do |arg|
|
||||
file_config.load "-"
|
||||
end
|
||||
|
||||
o.on "--control-url URL", "The bind url to use for the control server. Use 'auto' to use temp unix server" do |arg|
|
||||
configure_control_url(arg)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue