Questions tagged [laravel-envoy]

Laravel Envoy provides a clean, minimal syntax for defining common tasks you run on your remote servers. Using a Blade style syntax, you can easily setup tasks for deployment, Artisan commands, and more.

Laravel Envoy is a tool for executing common tasks you run on your remote servers. Using Blade style syntax, you can easily setup tasks for deployment, Artisan commands, and more. Currently, Envoy only supports the Mac and Linux operating systems. However, Windows support is achievable using WSL2.

72 questions
8
votes
1 answer

Laravel Envoy: abort on error

Is it possible to abort on errors or call another task when a command fails? This doesn't work: @task('migrate', ['on' => 'web']) cd {{ $currentReleaseDir }}; php artisan migrate || exit 1; @endtask It fails with the message (I know I can…
braindamage
  • 2,226
  • 4
  • 24
  • 33
6
votes
1 answer

How to pass arguments or params to Laravel Envoy task

I'm working on a laravel project where we use docker-compose for local development environment and we are trying to shorten the commands that we use for install composer dependencies and artisan with laravel/envoy. Here is an example of what we have…
Ivan Vilanculo
  • 648
  • 1
  • 11
  • 25
6
votes
2 answers

How can I access declared variable in bash when executing Laravel Envoy task?

I have simple Envoy setup. A server: @servers(['ws' => 'ws.sk']) ... And simple "ping" task: @task('ping-ws', ['on' => 'ws']) echo "Hello world from WS server!" echo $(pwd) pwd var_1="Hello" echo "${var_1}" @endtask Where I…
David Lukac
  • 728
  • 7
  • 20
6
votes
1 answer

How do I run an Envoy Task with a tty?

I'm using Laravel's Envoy library for deployment. When I get to the end of deployment, I need to change a bunch of files' ownership; in order to do this, I need to switch to the root user, because chown and chmod don't work as an unprivileged…
Goldentoa11
  • 1,700
  • 2
  • 17
  • 29
5
votes
1 answer

Laravel Envoy setup task not completing successfully

I'm trying to set up deployment with GitLab and Docker but can't get through the initial setup in the official Laravel Docs about Envoy setup. I can't connect through my host with Envoy for some weird reason. I am following this tutorial. Any help…
4
votes
1 answer

Laravel Envoy can't detect node/npm on Ubuntu when installed with NVM (node version manager) bash: line 5: npm: command not found

I've installed node/npm with NVM on Ubuntu 18.04. I can ssh into the server and run node -v (v13.9.0) and npm -v (v13.9.0), so they are installed and are executable by the user. When I try and do this via the Laravel Envoy deploy tool I get the…
twigg
  • 3,753
  • 13
  • 54
  • 96
4
votes
0 answers

Laravel Queue running Envoy Task Inconsistent when deployed

I'm building a site which is using laravel envoy to run commands on a remote server. When a button is clicked to run a task then it is added to the Queue (I'm using redis and horizon) so that it is processed in the background and doesn't slow the…
Angus Allman
  • 511
  • 1
  • 6
  • 10
4
votes
0 answers

Can I run Laravel envoy macro in a single session?

I am making a deploy script with Laravel Envoy, but since I'm using a SSH Key with password, the following macro asks the password for each task: @macro('deploy') ssh clone env storage composer migrate permissions done @endmacro Is there a…
femanzo
  • 179
  • 1
  • 7
3
votes
2 answers

Jwt verification fails by Envoy

I have a Laravel(Lumen) Login API, which generates a JWT using HS256. Then I sent my bearer token to Envoy Gateway and get from Envoy JWT verification fails On official JWT decode site I could successfully decode and verify my bearer token. Here I…
3
votes
1 answer

Laravel Envoy to SSH into bastion server, then, SSH into individual private web servers, stdout is split into new lines

Our infrastructure/challenges are interesting, and I'm not finding anything too relevant online or on other SO questions. Our build server is in a different VPC to our web servers, which are private. So build > web server isn't possible. I'm working…
Kingsley
  • 977
  • 2
  • 11
  • 27
3
votes
2 answers

Deploy to multiple servers with different project roots using Laravel Envoy

When deploying to multiple servers using Laravel Envoy, how can you specify the project root per server?. The example provided in the documentation assumes that the project root is the same path for both servers. Assume web-1 has project root as…
Richie
  • 1,398
  • 1
  • 19
  • 36
3
votes
1 answer

How to set a password in a Laravel Envoy script?

In Laravel 5.8 using envoy I want to set the password of a user in console command, like envoy run Deploy --serveruser_password=mypass1112233 Having in envoy file: @setup $server_login_user= 'serveruser'; $user_password =…
mstdmstd
  • 2,195
  • 17
  • 63
  • 140
3
votes
1 answer

Laravel Envoy show error but don't show evironment

I have a problem with Laravel Envoy. I'm wrote script for deploying on server and I'm calling that script with envoy run deploy --environment=staging but when error occur, I can't see from what production is error. For example, error occur on …
Duka
  • 513
  • 1
  • 6
  • 19
3
votes
1 answer

Is Laravel Envoy necessary when deploying Laravel app with GitLab CI via Continuous Delivery?

I am implementing Continuous Integration into my Laravel workflow, and while going through the basic I came across a sample project on Gitlab where (1.) Laravel Envoys was used to write tasks related to how the app should be deployed and then (2.)…
Edmond Tamas
  • 3,148
  • 9
  • 44
  • 89
3
votes
2 answers

Envoy Task Runner: run command that requires sudo access

I am using https://laravel.com/docs/5.4/envoy as a deployment tool. In the Envoy.blade.php, I have command that requires sudo access for example:- chmod 777 -R storage/ chmod 777 -R bootstrap/cache These commands fails with an error saying…
Dipendra Gurung
  • 5,720
  • 11
  • 39
  • 62
1
2 3 4 5