-1

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!

林奇海
  • 9
  • 1

1 Answers1

0

The error is clear, git is not installed or it is not in your $PATH.

/usr/bin/git: not found
  • How to include workspace docker container git in php-fpm docker container $PATH ? Or just install again in php-fpm container ? – 林奇海 Jan 23 '18 at 00:39