[FOLIO-1886] Use Okapi's config file facility Created: 21/Mar/19 Updated: 27/Feb/21 Resolved: 27/Feb/21 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | Adam Dickmeiss | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | platform-backlog, security, security-reviewed | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||
| Sprint: | |||||||||||||||||
| Development Team: | FOLIO DevOps | ||||||||||||||||
| Description |
|
Okapi 2.26.0 and later allows configuration in a file as an alternative to command-line arguments: Example: java -jar target/okapi-core-fat.jar -conf okapi1.json dev
cat okapi1.json
{
"storage" : "postgres",
"postgres_host" : "localhost",
"postgres_port" : "5432",
"postgres_username" : "okapi",
"postgres_password" : "okapi25"
}
Note that is works for Okapi configuration options only. They are listed in the Okapi Configuration section: https://github.com/folio-org/okapi/blob/master/doc/guide.md#okapi-configuration |
| Comments |
| Comment by Wayne Schneider [ 21/Mar/19 ] |
|
Adam Dickmeiss should we update the Okapi Debian package to make use of this facility? |
| Comment by Adam Dickmeiss [ 21/Mar/19 ] |
|
I think that's a good idea.. Hopefully pretty easy to do. Be sure to put it in /etc (or a directory under there) so that Debian can be smart about configuration changes.. Eg when user has modified it and package maintainer has modified it,, There will be a "conflict" which the user can resolve.. That's better than just overwriting (if not in /etc/). |
| Comment by Adam Dickmeiss [ 21/Mar/19 ] |
|
Note that you can also - if you like - put the mode of operation in configuration.. eg
java -jar target/okapi-core-fat.jar -conf okapi1.json
cat okapi1.json
{
"mode" : "dev",
"storage" : "postgres",
"postgres_host" : "localhost",
..
|
| Comment by Adam Dickmeiss [ 27/Feb/21 ] |
|
Closing as this was done in
|