mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-01-17 21:28:30 +01:00
Add missing AWS S3 driver, update backup package related config and docs
This commit is contained in:
parent
44f52588fa
commit
40356ad223
@ -24,9 +24,9 @@ SESSION_LIFETIME=10080
|
||||
## Backup configuration
|
||||
# Enable backups here
|
||||
BACKUP_ENABLED=false
|
||||
# Choose the destination of the backup. If you set up AWS S3 credentials below you may choose 'cloud' which is used
|
||||
# Choose the destination of the backup. If you set up AWS S3 credentials below you may choose 's3' which is used
|
||||
# as a synonym for AWS. Leave blank or set to 'local' if you want to store backups within /storage/app/backups.
|
||||
BACKUP_DISK=cloud
|
||||
BACKUP_DISK=s3
|
||||
# Set to false if you do not want to be notified about successful or broken backups
|
||||
BACKUP_NOTIFICATIONS=true
|
||||
# The notification email may be used to get backup notifications
|
||||
|
@ -24,9 +24,9 @@ SESSION_LIFETIME=10080
|
||||
## Backup configuration
|
||||
# Enable backups here
|
||||
BACKUP_ENABLED=false
|
||||
# Choose the destination of the backup. If you set up AWS S3 credentials below you may choose 'cloud' which is used
|
||||
# Choose the destination of the backup. If you set up AWS S3 credentials below you may choose 's3' which is used
|
||||
# as a synonym for AWS. Leave blank or set to 'local' if you want to store backups within /storage/app/backups.
|
||||
BACKUP_DISK=cloud
|
||||
BACKUP_DISK=s3
|
||||
# Set to false if you do not want to be notified about successful or broken backups
|
||||
BACKUP_NOTIFICATIONS=true
|
||||
# The notification email may be used to get backup notifications
|
||||
|
@ -13,6 +13,7 @@
|
||||
"laravel/fortify": "^1.7",
|
||||
"laravel/framework": "^8.0",
|
||||
"league/csv": "^9.6",
|
||||
"league/flysystem-aws-s3-v3": "^1.0",
|
||||
"predis/predis": "^1.1",
|
||||
"shaarli/netscape-bookmark-parser": "^2.1",
|
||||
"spatie/laravel-backup": "^6.11.1",
|
||||
|
191
composer.lock
generated
191
composer.lock
generated
@ -4,8 +4,93 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ca1d0154e63b5d72e092e495ed8413d0",
|
||||
"content-hash": "75b1c669e82522bdf5dcccfe11be3470",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.161.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "2703896142f292058ce9d6c9026a9329a89778e0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2703896142f292058ce9d6c9026a9329a89778e0",
|
||||
"reference": "2703896142f292058ce9d6c9026a9329a89778e0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-pcre": "*",
|
||||
"ext-simplexml": "*",
|
||||
"guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0",
|
||||
"guzzlehttp/promises": "^1.0",
|
||||
"guzzlehttp/psr7": "^1.4.1",
|
||||
"mtdowling/jmespath.php": "^2.5",
|
||||
"php": ">=5.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"andrewsville/php-token-reflection": "^1.4",
|
||||
"aws/aws-php-sns-message-validator": "~1.0",
|
||||
"behat/behat": "~3.0",
|
||||
"doctrine/cache": "~1.4",
|
||||
"ext-dom": "*",
|
||||
"ext-openssl": "*",
|
||||
"ext-pcntl": "*",
|
||||
"ext-sockets": "*",
|
||||
"nette/neon": "^2.3",
|
||||
"paragonie/random_compat": ">= 2",
|
||||
"phpunit/phpunit": "^4.8.35|^5.4.3",
|
||||
"psr/cache": "^1.0",
|
||||
"psr/simple-cache": "^1.0",
|
||||
"sebastian/comparator": "^1.2.3"
|
||||
},
|
||||
"suggest": {
|
||||
"aws/aws-php-sns-message-validator": "To validate incoming SNS notifications",
|
||||
"doctrine/cache": "To use the DoctrineCacheAdapter",
|
||||
"ext-curl": "To send requests using cURL",
|
||||
"ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages",
|
||||
"ext-sockets": "To use client-side monitoring"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Aws\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/functions.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"Apache-2.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Amazon Web Services",
|
||||
"homepage": "http://aws.amazon.com"
|
||||
}
|
||||
],
|
||||
"description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project",
|
||||
"homepage": "http://aws.amazon.com/sdkforphp",
|
||||
"keywords": [
|
||||
"amazon",
|
||||
"aws",
|
||||
"cloud",
|
||||
"dynamodb",
|
||||
"ec2",
|
||||
"glacier",
|
||||
"s3",
|
||||
"sdk"
|
||||
],
|
||||
"time": "2020-11-16T19:11:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
"version": "2.0.3",
|
||||
@ -1729,6 +1814,53 @@
|
||||
],
|
||||
"time": "2020-08-23T07:39:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-aws-s3-v3",
|
||||
"version": "1.0.29",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git",
|
||||
"reference": "4e25cc0582a36a786c31115e419c6e40498f6972"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/4e25cc0582a36a786c31115e419c6e40498f6972",
|
||||
"reference": "4e25cc0582a36a786c31115e419c6e40498f6972",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"aws/aws-sdk-php": "^3.20.0",
|
||||
"league/flysystem": "^1.0.40",
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"henrikbjorn/phpspec-code-coverage": "~1.0.1",
|
||||
"phpspec/phpspec": "^2.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Flysystem\\AwsS3v3\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Frank de Jonge",
|
||||
"email": "info@frenky.net"
|
||||
}
|
||||
],
|
||||
"description": "Flysystem adapter for the AWS S3 SDK v3.x",
|
||||
"time": "2020-10-08T18:58:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.5.1",
|
||||
@ -1871,6 +2003,63 @@
|
||||
],
|
||||
"time": "2020-07-23T08:41:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mtdowling/jmespath.php",
|
||||
"version": "2.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/jmespath/jmespath.php.git",
|
||||
"reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/42dae2cbd13154083ca6d70099692fef8ca84bfb",
|
||||
"reference": "42dae2cbd13154083ca6d70099692fef8ca84bfb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.4 || ^7.0 || ^8.0",
|
||||
"symfony/polyfill-mbstring": "^1.17"
|
||||
},
|
||||
"require-dev": {
|
||||
"composer/xdebug-handler": "^1.4",
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.15"
|
||||
},
|
||||
"bin": [
|
||||
"bin/jp.php"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"JmesPath\\": "src/"
|
||||
},
|
||||
"files": [
|
||||
"src/JmesPath.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Michael Dowling",
|
||||
"email": "mtdowling@gmail.com",
|
||||
"homepage": "https://github.com/mtdowling"
|
||||
}
|
||||
],
|
||||
"description": "Declaratively specify how to extract elements from a JSON document",
|
||||
"keywords": [
|
||||
"json",
|
||||
"jsonpath"
|
||||
],
|
||||
"time": "2020-07-31T21:01:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nesbot/carbon",
|
||||
"version": "2.41.5",
|
||||
|
@ -1,9 +1,5 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
$backupNotificationChannel = env('BACKUP_NOTIFICATIONS', true) ? [env('BACKUP_CHANNEL', true)] : [];
|
||||
|
||||
return [
|
||||
|
||||
'backup' => [
|
||||
@ -12,7 +8,7 @@ return [
|
||||
* The name of this application. You can use this name to monitor
|
||||
* the backups.
|
||||
*/
|
||||
'name' => 'backups',
|
||||
'name' => env('APP_NAME', 'laravel-backup'),
|
||||
|
||||
'source' => [
|
||||
|
||||
@ -33,13 +29,17 @@ return [
|
||||
'exclude' => [
|
||||
base_path('vendor'),
|
||||
base_path('node_modules'),
|
||||
storage_path('app/backups'),
|
||||
],
|
||||
|
||||
/*
|
||||
* Determines if symlinks should be followed.
|
||||
*/
|
||||
'follow_links' => false,
|
||||
|
||||
/*
|
||||
* Determines if it should avoid unreadable folders.
|
||||
*/
|
||||
'ignore_unreadable_directories' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
@ -88,7 +88,7 @@ return [
|
||||
*
|
||||
* If you do not want any compressor at all, set it to null.
|
||||
*/
|
||||
'database_dump_compressor' => Spatie\DbDumper\Compressors\GzipCompressor::class,
|
||||
'database_dump_compressor' => null,
|
||||
|
||||
'destination' => [
|
||||
|
||||
@ -101,7 +101,7 @@ return [
|
||||
* The disk names on which the backups will be stored.
|
||||
*/
|
||||
'disks' => [
|
||||
env('BACKUP_DISK', 'local'),
|
||||
env('BACKUP_DISK', 'local_backups'),
|
||||
],
|
||||
],
|
||||
|
||||
@ -113,7 +113,7 @@ return [
|
||||
|
||||
/*
|
||||
* You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'.
|
||||
* For Slack you need to install guzzlehttp/guzzle.
|
||||
* For Slack you need to install guzzlehttp/guzzle and laravel/slack-notification-channel.
|
||||
*
|
||||
* You can also use your own notification classes, just make sure the class is named after one of
|
||||
* the `Spatie\Backup\Events` classes.
|
||||
@ -121,12 +121,12 @@ return [
|
||||
'notifications' => [
|
||||
|
||||
'notifications' => [
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => $backupNotificationChannel,
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => $backupNotificationChannel,
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => $backupNotificationChannel,
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => $backupNotificationChannel,
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => $backupNotificationChannel,
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => $backupNotificationChannel,
|
||||
\Spatie\Backup\Notifications\Notifications\BackupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\UnhealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupHasFailed::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\BackupWasSuccessful::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\HealthyBackupWasFound::class => ['mail'],
|
||||
\Spatie\Backup\Notifications\Notifications\CleanupWasSuccessful::class => ['mail'],
|
||||
],
|
||||
|
||||
/*
|
||||
@ -136,20 +136,25 @@ return [
|
||||
'notifiable' => \Spatie\Backup\Notifications\Notifiable::class,
|
||||
|
||||
'mail' => [
|
||||
'to' => env('BACKUP_NOTIFICATION_EMAIL') ?: User::find(1)->mail ?? null,
|
||||
'to' => env('BACKUP_NOTIFICATION_EMAIL'),
|
||||
|
||||
'from' => [
|
||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||
],
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
'webhook_url' => env('BACKUP_NOTIFICATION_SLACK_WEBHOOK', ''),
|
||||
'webhook_url' => '',
|
||||
|
||||
/*
|
||||
* If this is set to null the default channel of the webhook will be used.
|
||||
*/
|
||||
'channel' => env('BACKUP_NOTIFICATION_SLACK_CHANNEL', null),
|
||||
'channel' => null,
|
||||
|
||||
'username' => env('BACKUP_NOTIFICATION_SLACK_USERNAME', null),
|
||||
'username' => null,
|
||||
|
||||
'icon' => env('BACKUP_NOTIFICATION_SLACK_ICON', null),
|
||||
'icon' => null,
|
||||
|
||||
],
|
||||
],
|
||||
@ -161,13 +166,24 @@ return [
|
||||
*/
|
||||
'monitor_backups' => [
|
||||
[
|
||||
'name' => 'backups',
|
||||
'name' => env('APP_NAME', 'laravel-backup'),
|
||||
'disks' => [env('BACKUP_DISK', 'local_backups')],
|
||||
'health_checks' => [
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => env('BACKUP_MAX_SIZE', 512),
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
[
|
||||
'name' => 'name of the second app',
|
||||
'disks' => ['local', 's3'],
|
||||
'health_checks' => [
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumStorageInMegabytes::class => 5000,
|
||||
],
|
||||
],
|
||||
*/
|
||||
],
|
||||
|
||||
'cleanup' => [
|
||||
@ -213,7 +229,8 @@ return [
|
||||
* After cleaning up the backups remove the oldest backup until
|
||||
* this amount of megabytes has been reached.
|
||||
*/
|
||||
'delete_oldest_backups_when_using_more_megabytes_than' => env('BACKUP_MAX_SIZE', 512),
|
||||
'delete_oldest_backups_when_using_more_megabytes_than' => 5000,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user