guysolamour/laravel-deploy
Composer 安装命令:
composer require guysolamour/laravel-deploy
包简介
Laravel deployment system built with ansible & ansistrano
README 文档
README
This package allows you to deploy a website on a dedicated server or a VPS by installing the various tools necessary for the operation of the site and by automating the deployment process.
Prerequis
- Works on Unix type system (MacOs and Linux)
- Ubuntu Server operating system
- have a bash version >= 4 (you can do
bash --version) otherwise update the bash shell - Instal ansible (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
- Instal anistrano (https://ansistrano.com)
Installation
Install via composer
composer require guysolamour/laravel-deploy
Preparing the server
1- Connect to the server
ssh root@000.000.000.000
# 000.000.000.000 must be changed with your server ip address
2- Create a user to run the tasks
sudo useradd user -s /bin/bash -d /home/user -m -G sudo
# user must be changed with your own user
3- Add created user to sudoers file
sudo visudo # Append user ALL=(ALL) NOPASSWD:ALL at the end of line # user must be changed with your own user
4- Install python on the remote server
sudo apt install -y python-apt
5- Disconnect from the remote machine and copy host machine ssh key for the created user
ssh-copy-id -i ~/.ssh/id_rsa.pub user@000.000.000.000 # If you dont have generate ssh key before use sshkeygen command to generate newly key # 000.000.000.000 must be changed with your server ip address
Scaffold
Run the scaffold command to generate the necessary base files. This command must be executed once and at the very beginning.
./vendor/bin/deploy scaffold --host 000.001.002.003 --domain domain.com --application appname
THE DIFFERENT STEPS
1- Generate the file that will contain the passwords
./vendor/bin/deploy password:create # Enter the password that will be used for decryption # This password must be saved in clear in the .vaultpass file # This file must not be versioned.
2- Add theses variables with the correct data
# The deployement user password. The user created on the server. vault_user_password: "password" # The deployment database password vault_database_password: "password" # The database root user password vault_database_root_password: "password" # The administrator password for admin panel in local vault_admin_local_password: "password" # The administrator password for admin panel in production vault_admin_production_password: "password" # The ftp password for backup. Can be blank. vault_ftp_password: "password" # Copy and paste the output of *php artisan key:generate --show command vault_app_key: "base64:appkey"
3- To modify the file containing the passwords
./vendor/bin/deploy password:edit
4- To view the contents of the file
./vendor/bin/deploy password:view
4- To delete the contents of the file
./vendor/bin/deploy password:delete
Available commands
- help
- scaffold
- configure:server
- password:create
- password:view
- password:edit
- password:delete
- run
- rollback
- db:seed
- db:deploy
- db:dump
- db:run
- db:import
- storage:dump
- storage:import
- storage:deploy
- exec
- dkim
- clean
- ssh
- env:deploy
Help
Get more informations
./vendor/bin/deploy help
Configure server
Run configure:server command to install all necessary softwares for a laravel project on the VPS (php, mysql, nginx ...).
./vendor/bin/deploy configure:server
Deploy
./vendor/bin/deploy run
Rollback
./vendor/bin/deploy rollback
Seed database
./vendor/bin/deploy db:seed
Database deploy
Copy and import local database into remote database
./vendor/bin/deploy db:deploy
Database import
Copy and import remote database into local database
./vendor/bin/deploy db:import
Database dump
Dump local database
./vendor/bin/deploy db:dump
Storage deploy
Copy and import local storage folder into remote storage folder
./vendor/bin/deploy storage:deploy
Storage import
Copy and import remote storage folder into local storage folder
./vendor/bin/deploy storage:import
Exec
Run a shell command online
./vendor/bin/deploy exec "pwd"
Dkim
Display DKIM public key
./vendor/bin/deploy dkim
Clean
Remove temporary files
./vendor/bin/deploy clean
SSH
SSH into remote project
./vendor/bin/deploy ssh
If you discover any security related issues, please email rolandassale@gmail.com instead of using the issue tracker.
Credits
This package is bootstrapped with the help of melihovv/laravel-package-generator.
guysolamour/laravel-deploy 适用场景与选型建议
guysolamour/laravel-deploy 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 48 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 06 月 13 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「deploy」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 guysolamour/laravel-deploy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 guysolamour/laravel-deploy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 guysolamour/laravel-deploy 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
blueways deployer recipes
The Laragoon utility package
A Highly Opinionated Symfony3/4 Deployer Recipe
Laravel Release Scripts, easy to set up one-off execute scripts that will be running during deploy script.
Deploy is an Artisan command with the aim to provide a very simple way to deploy your code into staging and production while ensuring valid version tags are applied.
Alfabank REST API integration
统计信息
- 总下载量: 48
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-06-13