feat: new configuration system (and schema) (#2819)

This commit is contained in:
Adam Cooke
2024-02-26 12:41:57 +00:00
committed by GitHub
parent 1c5ff5a9a6
commit 0163ac3d10
77 changed files with 1840 additions and 593 deletions
+5 -1
View File
@@ -24,7 +24,7 @@ bundle install
## Configuration
At present, configuration is handled using a config file. This lives in `config/postal/postal.yml`. An example configuration file is provided in `config/postal.example.yml`. This example is for development use only and not an example for production use.
Configuration is handled using a config file. This lives in `config/postal/postal.yml`. An example configuration file is provided in `config/examples/development.yml`. This example is for development use only and not an example for production use.
You'll also need a key for signing. You can generate one of these like this:
@@ -32,6 +32,10 @@ You'll also need a key for signing. You can generate one of these like this:
openssl genrsa -out config/postal/signing.key 2048
```
If you're running the tests (and you probably should be), you'll find an example file for test configuration in `config/examples/test.yml`. This should be placed in `config/postal/postal.test.yml` with the appropriate values.
If you prefer, you can configure Postal using environment variables. These should be placed in `.env` or `.env.test` as apprpriate.
## Running
The neatest way to run postal is to ensure that `./bin` is your `$PATH` and then use one of the following commands.