diff options
| author | Raito Bezarius <masterancpp@gmail.com> | 2023-05-14 23:12:50 +0200 |
|---|---|---|
| committer | Raito Bezarius <masterancpp@gmail.com> | 2023-05-14 23:13:48 +0200 |
| commit | 0e1179777d39d402ccb99231dc9846422ea6c4fa (patch) | |
| tree | f0e0171b98ea411f2c49c770883ab5a30a1bd1de | |
| parent | pixelfed: 0.11.5 -> 0.11.6 (diff) | |
| download | nixpkgs-origin/upgrade/pixelfed.tar.gz | |
nixos/pixelfed: cleanup package cache at the very startorigin/upgrade/pixelfed
| -rw-r--r-- | nixos/modules/services/web-apps/pixelfed.nix | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nixos/modules/services/web-apps/pixelfed.nix b/nixos/modules/services/web-apps/pixelfed.nix index 817d0f9b60f5..67e3ae988739 100644 --- a/nixos/modules/services/web-apps/pixelfed.nix +++ b/nixos/modules/services/web-apps/pixelfed.nix @@ -379,6 +379,12 @@ in { }; script = '' + # Before running any PHP program, cleanup the bootstrap. + # It's necessary if you upgrade the application otherwise you might + # try to import non-existent modules. + rm -f ${cfg.runtimeDir}/bootstrap/app.php + rm -rf ${cfg.runtimeDir}/bootstrap/cache/* + # Concatenate non-secret .env and secret .env rm -f ${cfg.dataDir}/.env cp --no-preserve=all ${configFile} ${cfg.dataDir}/.env @@ -402,11 +408,6 @@ in { # Install Horizon # FIXME: require write access to public/ — should be done as part of install — pixelfed-manage horizon:publish - # Before running any PHP program, cleanup the bootstrap. - # It's necessary if you upgrade the application otherwise you might - # try to import non-existent modules. - rm -rf ${cfg.runtimeDir}/bootstrap/* - # Perform the first migration. [[ ! -f ${cfg.dataDir}/.initial-migration ]] && pixelfed-manage migrate --force && touch ${cfg.dataDir}/.initial-migration |
