nixos/gitlab: Clean up the initializers on start
The initializers directory is populated with files from the gitlab distribution on start, but old files will be left in the state folder even if they're removed from the distribution, which can lead to startup failures. Fix this by always purging the directory on start before populating it.
This commit is contained in:
@@ -780,6 +780,7 @@ in {
|
||||
preStart = ''
|
||||
cp -f ${cfg.packages.gitlab}/share/gitlab/VERSION ${cfg.statePath}/VERSION
|
||||
rm -rf ${cfg.statePath}/db/*
|
||||
rm -rf ${cfg.statePath}/config/initializers/*
|
||||
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/config.dist/* ${cfg.statePath}/config
|
||||
cp -rf --no-preserve=mode ${cfg.packages.gitlab}/share/gitlab/db/* ${cfg.statePath}/db
|
||||
|
||||
|
||||
Reference in New Issue
Block a user