Skip to content

Commit

Permalink
gitlab service: fix database creation
Browse files Browse the repository at this point in the history
Providing custom a username and database name was broken. They were
hardcoded to "gitlab".
  • Loading branch information
fpletz committed Feb 12, 2017
1 parent 2495065 commit f5a82e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/misc/gitlab.nix
Expand Up @@ -528,8 +528,8 @@ in {
if [ "${cfg.databaseHost}" = "127.0.0.1" ]; then
if ! test -e "${cfg.statePath}/db-created"; then
psql postgres -c "CREATE ROLE gitlab WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'"
${config.services.postgresql.package}/bin/createdb --owner gitlab gitlab || true
psql postgres -c "CREATE ROLE ${cfg.databaseUsername} WITH LOGIN NOCREATEDB NOCREATEROLE NOCREATEUSER ENCRYPTED PASSWORD '${cfg.databasePassword}'"
${config.services.postgresql.package}/bin/createdb --owner ${cfg.databaseUsername} ${cfg.databaseName} || true
touch "${cfg.statePath}/db-created"
fi
fi
Expand Down

0 comments on commit f5a82e4

Please sign in to comment.