diff options
author | Yannick Markus <ym@ymarkus.dev> | 2021-04-13 13:58:50 +0200 |
---|---|---|
committer | Yannick Markus <ym@ymarkus.dev> | 2021-05-03 16:27:38 +0200 |
commit | 336f3607d4bc16d9c421d2dbd4dfa33491a74514 (patch) | |
tree | 03d7dc9b6c3b899c130c3dfe21a8d16c0f9f2c35 /nixos/modules/services/web-apps/bookstack.nix | |
parent | eae6e08525899cc8c38376fd78f58e80aeb375ce (diff) | |
download | nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.tar nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.tar.gz nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.tar.bz2 nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.tar.lz nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.tar.xz nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.tar.zst nixpkgs-336f3607d4bc16d9c421d2dbd4dfa33491a74514.zip |
nixos/bookstack: use umask before echoing & clear cache before starting
Diffstat (limited to 'nixos/modules/services/web-apps/bookstack.nix')
-rw-r--r-- | nixos/modules/services/web-apps/bookstack.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/services/web-apps/bookstack.nix b/nixos/modules/services/web-apps/bookstack.nix index 83d05ffbad9..34a31af9c9d 100644 --- a/nixos/modules/services/web-apps/bookstack.nix +++ b/nixos/modules/services/web-apps/bookstack.nix @@ -292,6 +292,8 @@ in { WorkingDirectory = "${bookstack}"; }; script = '' + # set permissions + umask 077 # create .env file echo " APP_KEY=base64:$(head -n1 ${cfg.appKeyFile}) @@ -317,13 +319,14 @@ in { ${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "SESSION_SECURE_COOKIE=true"} ${toString cfg.extraConfig} " > "${cfg.dataDir}/.env" - # set permissions - chmod 700 "${cfg.dataDir}/.env" # migrate db ${pkgs.php}/bin/php artisan migrate --force - # create caches + # clear & create caches (needed in case of update) + ${pkgs.php}/bin/php artisan cache:clear + ${pkgs.php}/bin/php artisan config:clear + ${pkgs.php}/bin/php artisan view:clear ${pkgs.php}/bin/php artisan config:cache ${pkgs.php}/bin/php artisan route:cache ${pkgs.php}/bin/php artisan view:cache |