corbosman/laravel-docker-secrets
Composer 安装命令:
composer require corbosman/laravel-docker-secrets
包简介
Use Docker Swarm Secrets in your Laravel config files
README 文档
README
This package allows you to use docker swarm secrets in your Laravel config files. Note there are some limitations, see the usage below.
Installation
Via Composer
$ composer require corbosman/laravel-docker-secrets
Usage
This package provides two helper methods that you can use in your laravel config files. Due to the way Laravel parses the config files, you can only use them in the env() method. In practice this is almost always exactly what you want, as it allows you to override the secrets locally for development.
<?php return [ 'password' => env('PASSWORD', docker_secret('my-docker-secret')) ]; ?>
You can also store encrypted docker secrets. Note that the secret must be encrypted using your app's key. This is useful if you share your swarm with a team. Other projects can't just mount your secrets and view them.
<?php return [ 'password' => env('PASSWORD', docker_secret_encrypted('my-encrypted-docker-secret')) ]; ?>
Finally, you can also return a default value if the secret isn't available.
<?php return [ 'password' => env('PASSWORD', docker_secret_encrypted('my-docker-secret', 'my-default')) ]; ?>
Creating encrypted secret
This package offers a command to easily generate an encrypted secret which you can then store in Docker Swarm. It uses the project's app secret for encryption so make sure that this same key is also used in the service that uses the Swarm secret. You can also simply use Tinker to create encrypted secrets.
$ artisan docker-secret:encrypt foobar eyJpdiI6ImY5dWdHeHJ2WkpZdUNTZFlVYUZpMFE9PSIsInZhbHVlIjoidmZPblk2eEIxNy8vdkl6OE5YSGF2dz09IiwibWFjIjoiZTdmYmVmNmQ5YzA5ZTI3YzI0NjFjOGJkOTY5ODhjNDkwMmMwYWVmMTkwYzcyNzMzN2ZlYWQ1NzlhNzlkM2RjZCJ9
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
Please see the license file for more information.
corbosman/laravel-docker-secrets 适用场景与选型建议
corbosman/laravel-docker-secrets 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18.38k 次下载、GitHub Stars 达 10, 最近一次更新时间为 2020 年 11 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「docker」 「secrets」 「swarm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 corbosman/laravel-docker-secrets 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 corbosman/laravel-docker-secrets 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 corbosman/laravel-docker-secrets 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secrets Manager for PHP
PSR-6 Cache Adapter for Secretary
A PHP library to encrypt/decrypt secrets using OpenSSL.
Docker based testing environment for shopware projects.
The Laragoon utility package
Docker compose for Robo Task Runner
统计信息
- 总下载量: 18.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 27
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-22