diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 27b4294b..47906f1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,6 +10,8 @@ build: deploy_staging: stage: deploy script: + - cd /home/cmc/cmc-sales + - git pull origin master - echo "Run the new docker image" - /home/cmc/cmc-sales/run_docker.sh environment: diff --git a/run_docker.sh b/run_docker.sh index 07c2f02b..4f3d9a11 100644 --- a/run_docker.sh +++ b/run_docker.sh @@ -1,4 +1,4 @@ -ID=$(docker ps -f ancestor=cmc:latest -q) +ID=$(docker ps -q) docker kill $ID sleep 1 -docker run -d -p 127.0.0.1:8888:80 --mount type=bind,source="$(pwd)"/app/webroot/pdf,target=/var/www/cmc-sales/app/webroot/pdf cmc:latest +docker run -d -p 127.0.0.1:8888:80 --mount type=bind,source=/home/cmc/cmc-sales/app/webroot/pdf,target=/var/www/cmc-sales/app/webroot/pdf cmc:latest