nixos/bookstack: use umask before echoing & clear cache before starting
This commit is contained in:
parent
eae6e08525
commit
336f3607d4
1 changed files with 6 additions and 3 deletions
|
@ -292,6 +292,8 @@ in {
|
||||||
WorkingDirectory = "${bookstack}";
|
WorkingDirectory = "${bookstack}";
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
|
# set permissions
|
||||||
|
umask 077
|
||||||
# create .env file
|
# create .env file
|
||||||
echo "
|
echo "
|
||||||
APP_KEY=base64:$(head -n1 ${cfg.appKeyFile})
|
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"}
|
${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "SESSION_SECURE_COOKIE=true"}
|
||||||
${toString cfg.extraConfig}
|
${toString cfg.extraConfig}
|
||||||
" > "${cfg.dataDir}/.env"
|
" > "${cfg.dataDir}/.env"
|
||||||
# set permissions
|
|
||||||
chmod 700 "${cfg.dataDir}/.env"
|
|
||||||
|
|
||||||
# migrate db
|
# migrate db
|
||||||
${pkgs.php}/bin/php artisan migrate --force
|
${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 config:cache
|
||||||
${pkgs.php}/bin/php artisan route:cache
|
${pkgs.php}/bin/php artisan route:cache
|
||||||
${pkgs.php}/bin/php artisan view:cache
|
${pkgs.php}/bin/php artisan view:cache
|
||||||
|
|
Loading…
Reference in a new issue