Hi
I'm trying to deploy a Laravel application using SCP deploy to a server. After deploying, I want to run multiple commands like
php artisan migrate
php artisan config:cache
in the deployed server. How can I achieve this.
Thank you.
Thank you for your question!
It's a good case to use ssh-run pipe, so you could run a command or a bash script on your server )
script: - pipe: atlassian/ssh-run:0.3.0 variables: SSH_USER: 'ec2-user' SERVER: '127.0.0.1' SSH_KEY: $MY_SSH_KEY MODE: 'script' COMMAND: 'myscript.sh' # path to a script in your repository
Also, we have scp-deploy pipe:
script: - pipe: atlassian/scp-deploy:1.0.1 variables: USER: 'ec2-user' SERVER: '127.0.0.1' REMOTE_PATH: '/var/www/build/' LOCAL_PATH: 'build/*'
More pipes you could find on Bitbucket Pipes Marketplace.
Cheers,
Oleksandr Kyrdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.