From b9e3917bd9bd038288cffc25652c3349d054b6c7 Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Wed, 7 Aug 2024 01:12:00 +0200 Subject: [PATCH] chore(app): Add deploy.php --- apps/app/composer.json | 5 +++++ apps/app/composer.lock | 45 +++++++++++++++++++++++++++++++++++++++++- apps/app/deploy.php | 39 ++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 apps/app/deploy.php diff --git a/apps/app/composer.json b/apps/app/composer.json index 4cb15c8..deed3a2 100644 --- a/apps/app/composer.json +++ b/apps/app/composer.json @@ -14,6 +14,7 @@ "livewire/livewire": "^3.0" }, "require-dev": { + "deployer/deployer": "^7.4", "fakerphp/faker": "^1.23", "laravel/pint": "^1.13", "mockery/mockery": "^1.6", @@ -47,7 +48,11 @@ "@php artisan key:generate --ansi", "@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", "@php artisan migrate --graceful --ansi" + ], + "deploy": [ + "./vendor/bin/dep deploy" ] + }, "extra": { "laravel": { diff --git a/apps/app/composer.lock b/apps/app/composer.lock index c2a890b..b815578 100644 --- a/apps/app/composer.lock +++ b/apps/app/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7633e4a6d88777a82624dc4fba74d753", + "content-hash": "70e6e3e8361af0c885ccfe168a2e0ca2", "packages": [ { "name": "bacon/bacon-qr-code", @@ -6610,6 +6610,49 @@ } ], "packages-dev": [ + { + "name": "deployer/deployer", + "version": "v7.4.0", + "source": { + "type": "git", + "url": "https://github.com/deployphp/deployer.git", + "reference": "b438dc22545ab2ecc67d79c80c7a79c156de3599" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/deployphp/deployer/zipball/b438dc22545ab2ecc67d79c80c7a79c156de3599", + "reference": "b438dc22545ab2ecc67d79c80c7a79c156de3599", + "shasum": "" + }, + "bin": [ + "dep" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Medvedev", + "email": "anton@medv.io" + } + ], + "description": "Deployment Tool", + "homepage": "https://deployer.org", + "support": { + "docs": "https://deployer.org/docs", + "issues": "https://github.com/deployphp/deployer/issues", + "source": "https://github.com/deployphp/deployer" + }, + "funding": [ + { + "url": "https://github.com/sponsors/antonmedv", + "type": "github" + } + ], + "time": "2024-04-17T20:55:49+00:00" + }, { "name": "fakerphp/faker", "version": "v1.23.1", diff --git a/apps/app/deploy.php b/apps/app/deploy.php new file mode 100644 index 0000000..50050be --- /dev/null +++ b/apps/app/deploy.php @@ -0,0 +1,39 @@ +set('remote_user', 'root') + ->set('deploy_path', '/var/www/app.getlicensed.dev'); + +// Hooks +after('deploy:failed', 'deploy:unlock'); +after('deploy:vendors', 'deploy:npm'); +after('artisan:migrate', 'deploy:chown');