bash – Can not run docker-compose from ssh shell

I'm working on setting up a script in my .gitlab-ci.yml file so that I can deploy a newly built Docker image on my server.

Here's what it looks like until now:

- ssh deploy@my.private.vps # / bin / sh -c "cd / home / project / one / directory / &
export PATH = / bin: / usr / bin: / usr / local / bin && 
docker-compose stop web &&
docker-compose rm -f web &&
docker-composer up -d web &&
docker-compose exec web php hand-crafted storage: link &&
exit "& # 39; 

However, I continue to receive "docker-compose: command not found" when executing the command. Of course, docker-compose is installed and available for the user to deploy when I log on to the user.

I found during my research that it was because SSH does not load usr / local / bin by default. I have tried to solve this problem by activating the user profile in the / etc / ssh / sshd_config file, and to export the PATH when running the script.

I am running out of ideas on what I should try next.

What should I do?

Any welcome idea