Skip to content

code16/occulta

Repository files navigation

Purpose

Save a versioned and encrypted copy of .env on aws s3

Installation

This package requires Laravel 8.x or higher.

You can install the package via composer:

composer require code16/occulta

Next you should publish the config file :

php artisan vendor:publish --provider="Code16\Occulta\OccultaServiceProvider"

and setup your values (especially the kms key_id and destination disk) in your config/occulta.php file :

    'key_id' => '0904c439-ff1f-4e9d-8a26-4e32ced6fe0x',

    'destination_disk' => 's3_backup',
];

Then, you should setup credentials to the proper aws user allowed to "use" the given kms key, by adding a kms section in your config/services.php file :

    'kms' => [
        'key' => env('AWS_ACCESS_KEY_ID'),
        'secret' => env('AWS_SECRET_ACCESS_KEY'),
        'region' => 'eu-central-1',
    ],

Nom you should schedule tasks for backup and cleanup in app/Console/Kernel.php :

    protected function schedule(Schedule $schedule)
    {
        $schedule->command('occulta:encrypt')->dailyAt('01:00');
        $schedule->command('occulta:clean')->dailyAt('02:00');
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages