library secret-keeper
Library to populate Docker Secrets into the environment
icosillion/secret-keeper
Library to populate Docker Secrets into the environment
- Wednesday, March 14, 2018
- by MarkusLewis
- Repository
- 1 Watchers
- 1 Stars
- 24 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 500 % Grown
Secret Keeper
PHP Library for reading Docker Secrets, (*1)
Installation
composer require icosillion/secret-keeper
Examples
Load Single Secret
<?php
use Icosillion\SecretKeeper\SecretKeeper;
$secretKeeper = new SecretKeeper();
echo $secretKeeper->load('testsecret');
Load All Secrets
<?php
use Icosillion\SecretKeeper\SecretKeeper;
$secretKeeper = new SecretKeeper();
$secrets = $secretKeeper->loadAll();
foreach ($secrets as $key => $value) {
echo "$key => $value\n";
}
Load All Secrets into Environment
<?php
use Icosillion\SecretKeeper\SecretKeeper;
$secretKeeper = new SecretKeeper();
$secretKeeper->populateEnvironment();
echo "testsecret (superglobal): {$_ENV['testsecret']}\n";
echo 'testsecret (getenv): ' . getenv('testsecret') . "\n";
dev-master
9999999-dev
Library to populate Docker Secrets into the environment
Sources
Download
MIT
The Requires
The Development Requires
1.0
1.0.0.0
Library to popular Docker Secrets into the environment
Sources
Download
MIT
The Requires
The Development Requires