gitlab: link tmp/ directory to writable path
This commit is contained in:
parent
f250015ea3
commit
60b0db0e08
|
@ -581,6 +581,7 @@ in {
|
|||
mkdir -p ${cfg.statePath}/{log,uploads}
|
||||
ln -sf ${cfg.statePath}/log /run/gitlab/log
|
||||
ln -sf ${cfg.statePath}/uploads /run/gitlab/uploads
|
||||
ln -sf ${cfg.statePath}/tmp /run/gitlab/tmp
|
||||
chown -R ${cfg.user}:${cfg.group} /run/gitlab
|
||||
|
||||
# Prepare home directory
|
||||
|
|
|
@ -84,12 +84,14 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
rm -r tmp
|
||||
mkdir -p $out/share
|
||||
cp -r . $out/share/gitlab
|
||||
rm -rf $out/share/gitlab/log
|
||||
ln -sf /run/gitlab/log $out/share/gitlab/log
|
||||
ln -sf /run/gitlab/uploads $out/share/gitlab/public/uploads
|
||||
ln -sf /run/gitlab/config $out/share/gitlab/config
|
||||
ln -sf /run/gitlab/tmp $out/share/gitlab/tmp
|
||||
|
||||
# rake tasks to mitigate CVE-2017-0882
|
||||
# see https://about.gitlab.com/2017/03/20/gitlab-8-dot-17-dot-4-security-release/
|
||||
|
|
Loading…
Reference in a new issue