🚀 Zero-downtime deployment out-of-the-box

Overview

🚀 Laravel Deployer

Looking for the old Laravel Deployer? Click here.

Laravel Deployer is no longer the package it used to be. Since that package was created, Deployer has become better and better at integrating with Laravel to the point that I will now put my efforts into maintaining Deployer directly for Laravel users rather than mirroring its changes on a different repo after each release. You can read more about this decision here.

I've written a series of tutorials to help Laravel users deploy their application using Deployer directly.

Deploy your Laravel app from scratch.

If you prefer a quick guide to get started with Deployer 7, I've added one for you below.

Deploy your Laravel application using Deployer 7

  • Add Deployer to your dependencies.
    composer require deployer/deployer:^7.0
  • Copy/paste the deploy.yaml or deploy.php file of this repository to the root of your project.
  • Update the deploy.yaml or deploy.php with your own server details.
  • Run dep deploy to deploy once.
  • Run dep ssh to connect to your server via SSH.
  • Run cp .env.example .env && php artisan key:generate to initialize your .env file.
  • Run vim .env and update your production environment variables.
  • Exit your server — exit.
  • Run dep deploy once more now that your .env file is all set up.
Comments
  • Updated composer.json

    Updated composer.json

    This fix #81.. As suggested in #79, it exclude tests files and other files that are irrelevant on production environment..

    But this PR use composer archive build-in function, and not use .gitattributes (which is 4 years old).

    Using composer function have the pro that the exclusion is limited to the use of composer and does not impact the use of git archive command, which is used by github (and others) to create release zip..

    Try to download latest release, in source code archive all files excluded by .gitattributes are missing.. But (IMHO) github's release should contains ALL repo files, and not just some.. If anyone want to use the package without using git (so without git clone), is unabled to do so with .gitattributes solution..

    Using composer archive function do not change anything related to git archive command, but when using composer require lorisleiva/laravel-deployer prevents the addition of the specified excluded files..

    opened by BoGnY 11
  • Add support for Laravel Telescope

    Add support for Laravel Telescope

    This PR adds support for Laravel's Telescope commands telescope:prune and telescope:clear. I've added an 'how-to' in the documentations section how it can be used.

    Cheers! Sacha

    opened by stelgenhof 6
  • Add once() to migrate as done in upstream tasks

    Add once() to migrate as done in upstream tasks

    Noticing that the overridden artisan:migrate command is missing the upstream change to only have it run on the first server.

    Was added in c1309f255fc6756c70c42465f76e3d08cbeebc7a

    And re-added in https://github.com/deployphp/deployer/pull/2169

    opened by joelpittet 3
  • 👀 Use matrix for actions

    👀 Use matrix for actions

    Use a php version array to avoid duplicating jobs. This allows you to decrease the size of the tests.yml file. Also this is executed when someone makes a pull request to the repository, tell me if you think we will remove it.

    opened by gregorip02 3
  • Add new tasks for Horizon and Telescope

    Add new tasks for Horizon and Telescope

    I've added artisan:horizon:assets and artisan:telescope:publish because if you use this package, which is gorgeous by the way, in an environment that has auto-deploy with continuous integration you will end up having the public/vendor directory empty thus breaking those two services

    NOTE neither of the commands force the overwrite so this is a safe execution.

    opened by ludo237 3
  • Fix tty supported method

    Fix tty supported method

    After upgrading to Laravel 7 I received the following error: Pseudo-terminal will not be allocated because stdin is not a terminal.

    turns out its caused from here https://github.com/lorisleiva/laravel-deployer/commit/20658cc432278325ab9f1ed14464e3cb57125e0a#diff-a062ee77a3ef1c08ca1f75de52cacbf5R116 and ! env('APP_ENV') === 'testing' returns false in none testing environment.

    opened by Daniyal-Javani 2
  • Removed Command test suite

    Removed Command test suite

    On PHPUnit > 9 the test suites failed because the matching directory couldn’t be found. This removed the folder from the configuration, therefore fixing the test suites.

    opened by timkley 1
  • Laravel 8 support

    Laravel 8 support

    This PR adds support for Laravel 8. Closes #203.

    It also extends the tests workflow to actually run against all supported Laravel versions. It was previously only running against the latest version.

    opened by andreiio 1
  • Update horizon task

    Update horizon task

    The new version of Horizon (v4+) doesn't rely on horizon:assets anymore but instead they have changed the command to horizon:publish to stay in sync with Telescope and Nova commands.

    I've added a new task just for that while keeping the old horizon:assets for backward compatibility.

    This is not a breaking change PR.

    ps: your youtube spa serie is lit 🔥

    opened by ludo237 1
Releases(v0.3.5)
  • v0.3.5(Oct 1, 2020)

  • v0.3.4(Sep 17, 2020)

  • v0.3.3(Sep 10, 2020)

  • v0.3.2(Apr 7, 2020)

  • v0.3.1(Apr 5, 2020)

  • v0.3.0(Mar 1, 2020)

    ⬆️ Add Support for Laravel 7

    Unfortunately, in order to support Laravel 7, this package needs to use Symfony components that are not compatible with Laravel 5.7 and below. Thus, support has been dropped for these older versions for v0.3.x.

    Source code(tar.gz)
    Source code(zip)
  • v0.2.18(Feb 29, 2020)

    ✨ New rollback hook available.

    Useful to attach custom logic when rolling back to a previous version. For example:

    // After a deployment has been rolled back.
    'rollback' => [
    
        // Reload PHP-FPM.
        'fpm:reload',
    ],
    
    Source code(tar.gz)
    Source code(zip)
  • v0.2.17(Dec 27, 2019)

  • v0.2.16(Nov 25, 2019)

  • v0.2.15(Nov 2, 2019)

  • v0.2.14(Nov 1, 2019)

  • v0.2.13(Oct 25, 2019)

    • ✨ Add new tasks: artisan:event:cache, artisan:event:clear and artisan:view:cache
    • 📝 Ignore .phpunit.result.cache file
    • 📚 Update documentation
    Source code(tar.gz)
    Source code(zip)
  • v0.2.12(Sep 4, 2019)

  • v0.2.11(Apr 14, 2019)

  • v0.2.10(Mar 27, 2019)

  • v0.2.9(Mar 25, 2019)

  • v0.2.8(Feb 27, 2019)

  • v0.2.7(Feb 14, 2019)

  • v0.2.6(Jan 13, 2019)

    • 📦 Added support and documentation for yarn. New tasks: yarn:install, yarn:development and yarn:production.
    • ❄️ Added a .gitattributes to exclude our tests related files from your vendor folder.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.5(Sep 5, 2018)

  • v0.2.4(Aug 16, 2018)

    • ❄️ New upload_vendors option which default to false. When set to true this option will (during an upload strategy only) skip the deploy:vendors task and include the vendor folder in your upload. (See #18)
    • 🚑 Fix the following issue on windows "'vendor' is not recognized as an internal or external command" by using a relative path to the compiled deploy.php file. (See #22)
    • 🚑 The commands executed by Laravel Deploy now returns an appropriate exit code. Formerly, it was throwing an exception but the returned status code was always 0. (See #41)
    • 🚑 Other small bug fixes.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.3(Jun 7, 2018)

    • 📥 New upload strategy. Uploads a production-ready folder directly within a new release. Read more.
    • ⚠️ Changed default upload options. When uploading either via the local strategy or the upload strategy, it will now exclude the /vendor folder instead of the vendor pattern. That is, only the vendor folder at the root of your project will be excluded. (See #14)
    • 🚑 Small bug fixes.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2(Apr 26, 2018)

  • v0.2.1(Apr 26, 2018)

    • 📄 Reload php-fpm in set up. When you run php artisan deploy:init and you are not using Laravel Forge, the command will ask you if you want to reload php-fpm after each deployment. (Using Laravel Forge default to reloading php-fpm). The command will then ask you which php version you are using. This information will be used to reload php-fpm using the right service. E.g. if you enter 7.0 it will reload the php7.0-fpm service. This can than be edited in the config/deploy.php file as the php_fpm_service option.

    • ⬇️ Import recipe/laravel.php. Laravel Deployer now has better control over artisan tasks and Laravel specific options.

      • The task artisan:migrate is now skipped with a warning if the .env file is inexistant or empty. This situation typically arises on first deployments and blocks the user from being able to edit their production environment after a first deployment.
      • ⚠️ Did not import the redondant deploy:public_disk task since artisan:storage:link already takes care of creating a symlink between public/storage and the public disk.
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Apr 21, 2018)

    What's new?

    • 📝 New configuration file. Configure your deployments via a traditional config/deploy.php file. In there you can configure your hosts, options, hooks, default strategy and even create new strategies without having to get your hand dirty in the Deployer namespace.

    • 🃏Deployment strategies. Choose amongst several deployment strategies or create your own strategies. Supported so far: basic (the default strategy of v0.1), firstdeploy (for migrating folder structure when using Laravel Deployer for the first time), local (for building assets locally before uploading them) and pull (for a quick no-zero-downtime git pull on the server).

    • 🔈 Dump that laravel.log without connecting to your server. Simply run php artisan logs and it will dump the last 200 lines of your laravel.log without the error stacks. Of course, you can configure that behaviour via the log_lines and log_command options.

    • 🖥 Useful information in the console. Upon deployment of every host, get an information message that let you know which strategy is being used for that particular deployment. Get the total execution time of your deployments in a success message.

    How to upgrade from v0.1

    1. Run php artisan deploy:init again to generate your new config/deploy.php file.
    2. Compare this with your previous deploy.php file at the root of your project. If you've manually added some hooks or customised some options, make sure you reflect those changes on the new config/deploy.php file.
    3. Delete your old deploy.php file at the root of your project.
    4. Deploy 🚀
    Source code(tar.gz)
    Source code(zip)
  • v0.1.5(Apr 18, 2018)

  • v0.1.4(Mar 26, 2018)

  • v0.1.1(Mar 10, 2018)

Owner
Loris Leiva
Hi there my geeky friends! 👋🦄
Loris Leiva
A nice GUI for Laravel Artisan, ready out of the box, configurable and handy for non-CLI experienced developers.

Artisan UI A nice GUI for Laravel Artisan, ready out of the box, configurable and handy for non-CLI experienced developers. Supported commands must be

Pablo Leone 1 Dec 3, 2021
A Laravel package to speed up deployment by skipping asset compilation whenever possible.

Airdrop for Laravel Read the full docs at hammerstone.dev/airdrop/docs. Hammerstone Airdrop for Laravel is a package that speeds up your deploys by sk

Hammerstone 160 Nov 24, 2022
Shell script for Git module deployment with include/exclude filters.

Deploy multiple Git repositories in an unique folder modgit is a shell script for deploying multiple Git repositories in root folder of any project, w

Johann Reinké 175 Nov 22, 2022
Livewire Notifier is a simple notifications system with zero dependencies above TALL-stack

Livewire Notifier is a simple notifications system with zero dependencies above TALL-stack (Tailwind CSS, Alpine.JS, Laravel and Livewire).

CodeSPB 18 Jul 27, 2022
Projeto de um blog chamado Blog Codar feito durante o curso PHP: Do zero a maestria, ministrado pelo Matheus Baptisti

PJ- Blog Codar Este projeto é um blog fictício. Apesar de poder ser usado como um blog real, este projeto não tem conexão com banco de dados, então es

João Pedro Sassi Granado 4 Nov 5, 2021
Projeto de uma rede social de Filmes feito durante o curso PHP: Do zero a maestria, ministrado pelo Matheus Baptisti

PJ - Moviestar Este projeto é uma rede social quase completa. O objeto de estudo aqui é a conexão de PHP + BD, PHP e a WEB, Regras de negócio complexa

João Pedro Sassi Granado 6 Jul 17, 2022
Collection of agnostic PHP Functions and helpers with zero dependencies to use as foundation in packages and other project

Collection of agnostic PHP Functions and helpers This package provides a lot of very usefull agnostic helpers to use as foundation in packages and oth

padosoft 54 Sep 21, 2022
Criação de um framework mvc do zero para estudo

PHP + PostgreSQL + PGAdmin4 + Composer A complete template for small projects Running the project To run this project you only need to run docker-comp

Eduardo Compiani 2 Jan 24, 2022
Message box application written in Laravel - simple inbox design using auth UI.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

null 0 Dec 25, 2021
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

A full-stack framework for Laravel that takes the pain out of building dynamic UIs.

Livewire 17.7k Jan 1, 2023
🧙‍♀️ Arcanist takes the pain out of building multi-step form wizards in Laravel.

Installation Arcanist requires PHP 8 and Laravel 8. composer require laravel-arcanist/arcanist Documentation You can find the full documentation here

Arcanist 378 Jan 3, 2023
This package gives you a set of conventions to make the most out of Hotwire in Laravel

Introduction This package gives you a set of conventions to make the most out of Hotwire in Laravel (inspired by the turbo-rails gem). There is a comp

Tony Messias 665 Jan 2, 2023
Library that offers Input Filtering based on Annotations for use with Objects. Check out 2.dev for 2.0 pre-release.

DMS Filter Component This library provides a service that can be used to filter object values based on annotations Install Use composer to add DMS\Fil

Rafael Dohms 89 Nov 28, 2022
A deployment tool written in PHP with support for popular frameworks out of the box

Deployer A deployment tool written in PHP with support for popular frameworks out of the box. See deployer.org for more information and documentation.

Deployer 9.7k Jan 1, 2023
Tool based on deployer.org to perform zero downtime deployments of Magento 2 projects

Magento 2 Deployer Plus Reliable fully-automated deployments tool for Magento 2. Zero downtime deployments on Magento versions >= 2.2 Automating your

Juan Alonso 194 Dec 27, 2022
Hydra is a zero-config API boilerplate with Laravel Sanctum that comes with excellent user and role management API out of the box

Hydra - Zero Config API Boilerplate with Laravel Sanctum Hydra is a zero-config API boilerplate with Laravel Sanctum and comes with excellent user and

Hasin Hayder 858 Dec 24, 2022
Laravel Feature Flags allows instant, zero-deployment toggling of application features.

Dynamic Feature Flags for Laravel Laravel Feature Flags allows instant, zero-deployment toggling of application features. The state of each feature fl

Coding Labs 35 Oct 4, 2022
Hi Im L, I found a box that I believe it's contain Kira's real ID. for open that box we need to find three keys. let's start looking for them

DeathNote ctf Description are you smart enaugh to help me capturing the three keys for open the box that contain the real ID of kira? Let's start solv

Hamza Elansari 4 Nov 28, 2022
Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.

Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.

scotch 2.7k Jan 8, 2023
Opsie Operator is a CLI to check your website for HTTP downtime.

Opsie Operator Monitor any website. Run in Docker or any Kubernetes cluster. Send webhooks. ?? Supporting If you are using one or more Renoki Co. open

opsie 14 Dec 6, 2021