sagarchauhan/laravel-serverless-installer
Composer 安装命令:
composer require sagarchauhan/laravel-serverless-installer
包简介
Laravel Serverless Installer for all laravel apps
README 文档
README
A simple laravel installer package that guides you into installing a fully optimised Laravel Serverless app
Screenshot
Installation
Run composer require sagarchauhan/laravel-serverless-installer into your app and then follow the steps.
Register Service Provider (Lumen Only)
This is not required in laravel , but if you are in lumen then you have to register service provider in bootstrap/app.php.
$app->register(sagarchauhan\LaravelServerlessServiceProvider::class);
Publishing Config In Laravel
php artisan vendor:publish --tag="serverless"
Publishing Config In Lumen
php artisan sagarchauhan:publish serverless
Run Setup in CorePHP
./vendor/bin/serverless-installer
Run Setup (In Lumen/Laravel)
./vendor/bin/serverless-installer
Global Setup (Ubuntu)
Move the vendor/bin/serverless-installer to /usr/bin or /usr/local/bin and then run serverless-installer to setup the serverless framework.
Post Installation (Manual task)
- Add
'token' => env('AWS_SESSION_TOKEN'),as a node in your queue.phpsqsdriver. This is running issue in Laravel. You can read more about it here
-
Define
AWS_SESSION_TOKEN=in your env file. Leave its value empty. It just needs to be there. That's it. -
Next add AWS related env values in your .env file
AWS_ACCESS_KEY_ID=<key>
AWS_SECRET_ACCESS_KEY=<secret>
AWS_DEFAULT_REGION=ap-south-1
QUEUE_CONNECTION=sqs
SQS_PREFIX=<you-will-get-this-once-you-deploy-your-app-till-then-you-can-leave-empty> #put the actual value on second deployment
SQS_QUEUE=<you-will-get-this-once-you-deploy-your-app-till-then-you-can-leave-empty> #put the actual value on second deployment
ASSET_URL=https://<bucket-name>.s3.ap-south-1.amazonaws.com #required for apps that have front-end and back-end coupled
- For enabling scheduler, open your
Kernal.phpfile insideapp/Console.Inside schedule function add
$schedule->command('telescope:prune --hours=48')->daily()->timezone('Asia/Kolkata'); for pruning telescope logs on daily basis.
Author
Sagar Chauhan works as a Project Manager - Technology at Greenhonchos. In his spare time, he hunts bug as a Bug Bounty Hunter. Follow him at Instagram, Twitter, Facebook, Github
License
MIT
统计信息
- 总下载量: 255
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-16