This is the first time to add a gitlab webhook in my laravel application running in laradocker.
-
First, run docker up:
docker-compose up -d nginx redis mysql
-
Second, add webhook in my gitlab project
point to laravel website http://example.com/deploy/
-
Third, laravel add router and Controller
// web.php Route::post('/deploy', 'DeployController@index')->name('deploy'); // DeployController //........ $result = shell_exec("/usr/bin/git pull"); logger('success result: ' . $result); //.........
It doesn't work!
which step go wrong?
I found php-fpm has logs like:
[22-Jan-2018 07:46:46] WARNING: [pool www] child 7 said into stderr: "sh: 1: /usr/bin/git: not found"
I am a new docker learner, it will helpfull if you leaves some comment or advise, thanks!