fix: firefly now without copying
This commit is contained in:
parent
d7b649395c
commit
22b78d1840
|
@ -116,17 +116,14 @@ in {
|
|||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
User = "firefly-iii";
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
WorkingDirectory = package;
|
||||
};
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
umask 077
|
||||
cp -f -r ${package}/* ${cfg.dataDir}
|
||||
find ${cfg.dataDir} -perm 400 -exec chmod 444 {} \;
|
||||
find ${cfg.dataDir} -perm 500 -exec chmod 555 {} \;
|
||||
${lib.optionalString cfg.dbCreateLocally ''
|
||||
mkdir -p ${cfg.dataDir}/storage/database/
|
||||
touch ${cfg.dataDir}/storage/database/database.sqlite
|
||||
mkdir -p ${package}/storage/database/
|
||||
touch ${package}/storage/database/database.sqlite
|
||||
''}
|
||||
|
||||
# migrate db
|
||||
|
@ -161,7 +158,7 @@ in {
|
|||
recommendedOptimisation = mkDefault true;
|
||||
recommendedGzipSettings = mkDefault true;
|
||||
virtualHosts.${cfg.virtualHost} = {
|
||||
root = "${cfg.dataDir}/public";
|
||||
root = "${package}/public";
|
||||
locations = {
|
||||
"/" = {
|
||||
tryFiles = "$uri $uri/ /index.php?$query_string";
|
||||
|
|
|
@ -17,10 +17,10 @@ in
|
|||
installPhase = ''
|
||||
mkdir -p $out/storage
|
||||
cp -r ./ $out
|
||||
rm -R $out/storage
|
||||
#ln -fs ${dataDir}/storage $out/storage
|
||||
#ln -fs ${dataDir}/bootstrap/cache $out/bootstrap/cache
|
||||
#ln -fs ${dataDir}/.env $out/.env
|
||||
rm -Rf $out/storage
|
||||
ln -fs ${dataDir}/storage $out/storage
|
||||
rm -Rf $out/bootstrap/cache
|
||||
ln -fs ${dataDir}/bootstrap/cache $out/bootstrap/cache
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue