承接 knackline/laravel-deploy 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

knackline/laravel-deploy

最新稳定版本:0.0.1

Composer 安装命令:

composer require knackline/laravel-deploy

包简介

A Laravel package for deploying Laravel projects using a shell script.

README 文档

README

Laravel PHP License

Overview

The Knackline Laravel Deploy Package simplifies the deployment of Laravel projects using a customizable shell script. This package allows you to create and manage a deployment script that can be tailored to your specific project needs. It also supports optional integration with Laravel Horizon and Telescope.

Features

  • Customizable Deployment Script: Automatically generate and customize a deployment script based on your project requirements.
  • Horizon & Telescope Support: Includes commands for Horizon and Telescope if they are installed in your project.
  • PHP Version Management: Specify the PHP version to use during deployment, with support for versioned paths.
  • Git Branch Selection: Define the default Git branch to deploy from.

Installation

To install the package, run:

composer require knackline/laravel-deploy

After installation, you can publish the configuration file and the deployment script:

php artisan deploy:setup

Usage

Setup Deployment

To set up the deployment configuration and script, use:

php artisan deploy:setup

During setup, you will be prompted for:

  1. Laravel Project/Application Path: The path to your Laravel project. If left blank, it defaults to the root of your Laravel installation.
  2. Default Git Branch: The Git branch to deploy.
  3. PHP Version: The PHP version to use. If left blank, it defaults to /usr/bin/php.

The script and configuration file will be generated based on your input.

Running the Deployment

Once the script is generated, you can deploy your application by running:

php artisan deploy

This script will:

  1. Navigate to the specified project directory.
  2. Fetch the latest code from the specified Git branch.
  3. Install or update composer dependencies.
  4. Run database migrations and other necessary commands.
  5. Display a success message upon completion.

Configuration

The configuration file (config/deploy.php) allows further customization:

return [
    'script_path' => base_path('deploy.sh'),  // Path to the generated deployment script
    'project_path' => '/path/to/your/project',  // Path to your Laravel project
    'git_branch' => 'main',  // Default Git branch to deploy
];

You can manually adjust these settings as needed.

Credits

RAJKUMAR - rajkumarsamra@gmail.com (Github)

License

This package is open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-14