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:
@@ -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'
|
||||
''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user