PHPackages                             bearcodi/docker-secrets-exposer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bearcodi/docker-secrets-exposer

ActivePackage[Utility &amp; Helpers](/categories/utility)

bearcodi/docker-secrets-exposer
===============================

Docker secrets expander for Laravel environment configuration.

1.0.0(7y ago)11.1k↓71.4%1[3 issues](https://github.com/bearcodi/docker-secrets-exposer/issues)MITPHPPHP &gt;=5.6.0

Since Dec 19Pushed 7y ago1 watchersCompare

[ Source](https://github.com/bearcodi/docker-secrets-exposer)[ Packagist](https://packagist.org/packages/bearcodi/docker-secrets-exposer)[ RSS](/packages/bearcodi-docker-secrets-exposer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Docker Secrets Expander
=======================

[](#docker-secrets-expander)

[![Build Status](https://camo.githubusercontent.com/eeb2079c0694a2323b315724df4ddde22a0e15e61ba1f767b3753e68b90501de/68747470733a2f2f7472617669732d63692e6f72672f62656172636f64692f646f636b65722d736563726574732d6578706f7365722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/bearcodi/docker-secrets-exposer)[![laravel5.7](https://camo.githubusercontent.com/c4461247c3a8995843e77c79f0f55f60092c89aa878063978ee43a536a4dc559/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d352e372d6f72616e67652e7376673f6c6f676f3d6c61726176656c)](https://camo.githubusercontent.com/c4461247c3a8995843e77c79f0f55f60092c89aa878063978ee43a536a4dc559/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d352e372d6f72616e67652e7376673f6c6f676f3d6c61726176656c)[![php7](https://camo.githubusercontent.com/a141284a1f360df77bdbfc3a98b8726bc11361952313c09c98a7714fa03d5ce5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e312d626c75652e737667)](https://camo.githubusercontent.com/a141284a1f360df77bdbfc3a98b8726bc11361952313c09c98a7714fa03d5ce5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e312d626c75652e737667)

A drop in package when using Laravel in a Docker Swarm setup and wanting to expand docker secrets easily.

But why?
--------

[](#but-why)

> Write a blurb about why you would want to use this, and why the value isn't just replaced or cached....security yo!!!

Installation
------------

[](#installation)

Hey, we all like composer here right??

```
composer require bearcodi/docker-secrets
```

### Laravel setup

[](#laravel-setup)

Its 2018, and Laravel is fun to dev packages for, is already setup!!!

### Non Laravel projects

[](#non-laravel-projects)

Hmmmm, need to think about this for Code Igniter.

Usage
-----

[](#usage)

Within you `.env` file, or from you `docker-compose.yml` stack file using environment variables, define your secret prefixing it with `dockersecrets://` DSN.

```
DB_PASSWORD=dockersecrets://db-password
```

> **IMPORTANT** If you are using a docker secret in your code not in a string context (ie. array key lookup) either cast it to a string `(string) config("CONFIG_KEY")` or use the `expose()` method on the return value as it is an instance of `Bearcodi\DockerSecrets\Secret`

The secret is then parsed and replaced with the Secret handler, when evalutated in a string usage the secret file value is returned on demand without exposing it in your applications environment.

Laravel environment key exclusions
----------------------------------

[](#laravel-environment-key-exclusions)

KeyReason for exclusion`DB_CONNECTION`The value is used in an array key lookup when establishing the database connection driver, see array key lookups

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2708d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08f895f522134c303d8fb486f4a75158c6c815c3084dd1822050499537398946?d=identicon)[bearcodi](/maintainers/bearcodi)

---

Top Contributors

[![bearcodi](https://avatars.githubusercontent.com/u/210376?v=4)](https://github.com/bearcodi "bearcodi (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bearcodi-docker-secrets-exposer/health.svg)

```
[![Health](https://phpackages.com/badges/bearcodi-docker-secrets-exposer/health.svg)](https://phpackages.com/packages/bearcodi-docker-secrets-exposer)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
