Fix stg deploy

This commit is contained in:
Karl Cordes 2019-04-25 13:37:36 +10:00
parent 21d6f688db
commit 1078a7cff5
2 changed files with 4 additions and 2 deletions

View file

@ -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:

View file

@ -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