-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployer script #44
Comments
I haven't tested it and it can be cleaned up slightly using recipes but here's the equivalent as a Deployer config file. Just put that in the root of your app as I've taken the liberty to push the May I ask why you need to run import:
- recipe/laravel.php
- contrib/php-fpm.php
- contrib/yarn.php
config:
application: 'opendor.me'
repository: '[email protected]:Astrotomic/opendor.me.git'
php_fpm_version: '8.0'
hosts:
prod_1:
remote_user: forge
hostname: '139.59.161.100'
deploy_path: '~/opendor.me'
prod_2:
remote_user: forge
hostname: '139.59.161.101'
deploy_path: '~/opendor.me'
tasks:
deploy:
- artisan:backup:up
- cache:config:delete
- artisan:optimize:clear
- deploy:prepare
- deploy:vendors
- yarn:install
- yarn:run:prod
- artisan:blade-fontawesome:sync-pro
- artisan:icons:cache
- artisan:nova:publish
- artisan:horizon:publish
- artisan:config:cache
- artisan:event:cache
- artisan:route:cache
- artisan:view:cache
- artisan:migrate
- artisan:permission:cache-reset
- artisan:permission:ensure
- artisan:schedule-monitor:sync
- deploy:publish
- php-fpm:reload
artisan:backup:up:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan backup:run'
cache:config:delete:
script: 'cd {{release_or_current_path}} && rm -f bootstrap/cache/config.php'
artisan:blade-fontawesome:sync-pro:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan blade-fontawesome:sync-pro'
artisan:icons:cache:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan icons:cache'
artisan:nova:publish:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan nova:publish'
artisan:horizon:publish:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan horizon:publish'
artisan:permission:cache-reset:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan permission:cache-reset'
artisan:permission:ensure:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan permission:ensure'
artisan:schedule-monitor:sync:
script: 'cd {{release_or_current_path}} && {{bin/php}} artisan schedule-monitor:sync'
yarn:run:prod:
script: 'cd {{release_or_current_path}} && {{bin/yarn}} run production'
after:
deploy:failed: deploy:unlock |
Yeah, I would put the {
"scripts": {
"post-update-cmd": [
"@php artisan horizon:publish --ansi"
]
}
} |
As I run |
Right now I'm using simple SSH deployment - because I have multiple hosts and want to maintain the deployment script next to the code I want to use https://deployer.org instead.
If you don't know deployer yet - @lorisleiva has a great course about deployer with Laravel https://lorisleiva.com/deploy-your-laravel-app-from-scratch
The current deployment script is:
The text was updated successfully, but these errors were encountered: