Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/myxiaoao/laravel-deploy


https://github.com/myxiaoao/laravel-deploy

Last synced: 2 days ago
JSON representation

Awesome Lists containing this project

README

        

# Laravel Deploy Package

![Laravel](https://img.shields.io/badge/Laravel-10.x-orange+?logo=laravel)
![PHP](https://img.shields.io/badge/PHP-8.1%2B-blue+?logo=php)
![License](https://img.shields.io/badge/license-MIT-brightgreen+?logo=MIT)

## Overview

The **Laravel Deploy Package** simplifies the deployment of Laravel projects using a customizable shell script.

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:

```bash
composer require cooper/laravel-deploy
```

After installation, you can publish the deployment script:

```bash
php artisan deploy:setup
```

## Usage

### Setup Deployment

To set up the deployment script, use:

```bash
php artisan deploy:setup
```

During setup, you will be prompted for:

- **Default Git Branch:** The Git branch to deploy. If left blank, it defaults to the master of your Laravel installation.

The script file will be generated based on your input.

### Running the Deployment

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

```bash
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.

## License

This package is open-sourced software licensed under the [MIT license](LICENSE.md).