diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2018-04-15 16:29:43 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2018-04-22 09:26:10 +0200 |
commit | 97c5bcec136eb549b57cdb74ebd9da7ca1338e90 (patch) | |
tree | f22f3a7cd366f695fd1ef004140f0f8497bcd186 /INSTALL | |
parent | 2b280ea3d864d80da1a49c982867d261ec865e43 (diff) | |
download | aur-97c5bcec136eb549b57cdb74ebd9da7ca1338e90.tar.gz aur-97c5bcec136eb549b57cdb74ebd9da7ca1338e90.tar.xz |
config: allow reading both the defaults file and the modified config
In the process, rename config.proto to config.defaults (because that is
what it is now).
Also use dict.get('key', default_value) when querying os.environ, rather
than an if block, as it is more pythonic/readable/concise, and reduces
the number of dict lookups.
This change allows aurweb configuration to be done via either:
- copying config.defaults to config and modifying values
- creating a new config only containing modified values, next to a
config.defaults containing unmodified values
The motivation for this change is to enable ansible configuration in our
flagship deployment by storing only changed values, and deferring to
config.defaults otherwise.
A side benefit is, it is easier to see what has changed by inspecting
only the site configuration file.
If a config.defaults file does not exist next to $AUR_CONFIG or in
$AUR_CONFIG_DEFAULTS, it is ignored and *all* values are expected to
live in the modified config file.
Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -40,8 +40,10 @@ read the instructions below. Ensure to enable the pdo_mysql extension in php.ini. -3) Copy conf/config.proto to /etc/aurweb/config and adjust the configuration - (pay attention to disable_http_login, enable_maintenance and aur_location). +3) Optionally copy conf/config.defaults to /etc/aurweb/. Create or copy + /etc/aurweb/config (this is expected to contain all configuration settings + if the defaults file does not exist) and adjust the configuration (pay + attention to disable_http_login, enable_maintenance and aur_location). 4) Create a new MySQL database and a user and import the aurweb SQL schema: |