Fix for included files in backup

This commit is contained in:
snipe 2019-05-23 17:08:51 -07:00
parent f6ef139111
commit 8e86d780bf

View file

@ -1,5 +1,19 @@
<?php <?php
// This is janky, but necessary to figure out whether to include the .env in the backup
$included_dirs = [
base_path('public/uploads'),
base_path('config'),
base_path('storage/private_uploads'),
base_path('storage/oauth-private.key'),
base_path('storage/oauth-public.key'),
];
if (env('BACKUP_ENV')=='true') {
$included_dirs[] = base_path('.env');
}
return [ return [
'backup' => [ 'backup' => [
@ -17,14 +31,7 @@ return [
/* /*
* The list of directories and files that will be included in the backup. * The list of directories and files that will be included in the backup.
*/ */
'include' => [ 'include' => $included_dirs,
base_path('public/uploads'),
base_path('config'),
base_path('storage/private_uploads'),
base_path('storage/oauth-private.key'),
base_path('storage/oauth-public.key'),
// (env('BACKUP_ENV')=='true') ? base_path('.env') : '',
],
/* /*
* These directories and files will be excluded from the backup. * These directories and files will be excluded from the backup.
@ -34,7 +41,6 @@ return [
'exclude' => [ 'exclude' => [
base_path('vendor'), base_path('vendor'),
base_path('node_modules'), base_path('node_modules'),
//storage_path('app/backup-temp'),
], ],
/* /*