webid/radis
Composer 安装命令:
composer create-project webid/radis
包简介
Radis - Rewiew Apps Deployed In Seconds
README 文档
README
Prerequisites
- PHP 7.4 or greater
Installation
Require this package with composer. It is recommended to only require the package for development.
composer require webid/radis --dev
Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
Publish the package configuration and stubs with the publish command:
php artisan vendor:publish --provider="WebId\Radis\RadisProvider"
Configurations
1. Configuration
You need to start by configuring your environment variables to access forge in config/radis.php
First of all, create a new token here: https://forge.laravel.com/user/profile#/api and paste the generated copy in
the .env file:
RADIS_TOKEN="my-brand-new-forge-token"
return [ 'forge' => [ 'token' => env('RADIS_TOKEN'), 'server_name' => env('RADIS_SERVER_NAME'), 'server_domain' => env('RADIS_SERVER_DOMAIN'), 'site_php_version' => env('RADIS_SITE_VERSION', 'php80'), 'database_password' => env('RADIS_DATABASE_PASSWORD', 'root'), 'lets_encrypt_type' => env('RADIS_LETS_ENCRYPT_TYPE'), 'lets_encrypt_api_key' => env('RADIS_LETS_ENCRYPT_API_KEY'), 'timeout' => env('RADIS_FORGE_TIMEOUT'), ], 'git_repository' => env('RADIS_GIT_REPOSITORY') ];
lets_encrypt_type and lets_encrypt_api_key are not required, but it's needed for auto HTTPS. For digitalocean
example (https://docs.digitalocean.com/reference/api/create-personal-access-token/):
RADIS_LETS_ENCRYPT_TYPE=digitalocean RADIS_LETS_ENCRYPT_API_KEY=EXEMPLE98edb566f9917d797fba2c0b05e2f2064ad7771422740181561322961
Wildcard certificates
Due to Let's Encrypt limitations about making too many certificates on a registered domain (50 per week), if a wildcard certificate is set up on the parent site on Forge, it will be automatically used for the review apps instead of creating a new specific one.
2. .env stub
After that, you need to adapt the desired .env file for your review app by modifying the stub stubs/env.stub
Don't change the constants starting with STUB_, they will be automatically replaced according to your configuration,
or the parameters given to artisan commands.
3. Deploy script stub
Finally, you need to adapt the forge deployment script according to your project in the stub stubs/deployScript.stub
Usage
Create a review app
⚠️ If a review app already exists with this name, it will be destroyed and recreated
php artisan radis:create mySiteName myGitBranch php artisan radis:create mySiteName myGitBranch customDatabaseName
Update an existing review app
This will only launch the deploy script
php artisan radis:update mySiteName
Destroy a review app
⚠️ This will remove both database and associated user database
php artisan radis:destroy mySiteName
Update the .env file
php artisan radis:env mySiteName php artisan radis:env mySiteName customDatabaseName
Update the deploy script
ℹ️ It updates the script without running it
php artisan radis:deploy-script mySiteName myGitBranch
Credits
webid/radis 适用场景与选型建议
webid/radis 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 39.01k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2021 年 01 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「forge」 「laravel-package」 「forge-review」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 webid/radis 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webid/radis 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 webid/radis 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Create restful API client in PHP
A Laravel package for converting English numbers into Bangla digits, Bangla words, Bangla month names, and Bangla money format with an easy-to-use API.
Laravel table comments loader (part of Diplodocker project)
jitone-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.
Create ephemeral test environments from git branches on Laravel Forge
Laravel JWT auth service package
统计信息
- 总下载量: 39.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-25