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