mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-27 07:14:52 +00:00
nixos/gitlab: fix database config when no passwordfile is defined
In commit 41ca9c1
, the database config got an additional config entry
for a separate CI database connection [1]. Unfortunately, the main connection
must always be the first entry. The fix for this was only applied when
databasePasswordFile has been set.
This commit fixes the order of the config for deployments without a databasePasswordFile.
[1] https://docs.gitlab.com/ee/update/deprecations.html#single-database-connection-is-deprecated
This commit is contained in:
parent
6c80c4ed49
commit
890ffaa1ae
@ -1359,6 +1359,7 @@ in {
|
||||
''
|
||||
else ''
|
||||
jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
|
||||
'${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.9" then ".production.main as $main | del(.production.main) | .production |= {main: $main} + ." else ""}' \
|
||||
>'${cfg.statePath}/config/database.yml'
|
||||
''
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user