Skip to content

Commit

Permalink
nixos/pixelfed: cleanup package cache at the very start
Browse files Browse the repository at this point in the history
(cherry picked from commit db23065)
  • Loading branch information
RaitoBezarius authored and github-actions[bot] committed Jun 27, 2023
1 parent 3f88db2 commit f105bff
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nixos/modules/services/web-apps/pixelfed.nix
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,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
Expand All @@ -406,11 +412,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
Expand Down

0 comments on commit f105bff

Please sign in to comment.