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:
parent
0f8133d633
commit
c6efa9fd2d
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue