Restart prod container always. Remove staging from .gitlab-ci since it wasn't even running
This commit is contained in:
parent
a70488ec9d
commit
8787b25115
|
|
@ -7,19 +7,6 @@ build:
|
||||||
script:
|
script:
|
||||||
- docker build --build-arg=COMMIT=$(git rev-parse --short HEAD) . -t "cmc:latest"
|
- docker build --build-arg=COMMIT=$(git rev-parse --short HEAD) . -t "cmc:latest"
|
||||||
|
|
||||||
deploy_staging:
|
|
||||||
stage: deploy
|
|
||||||
script:
|
|
||||||
- cd /home/cmc/staging/
|
|
||||||
- git pull origin master
|
|
||||||
- echo "Run the new docker image"
|
|
||||||
- cp /home/cmc/staging/stagingpasswd /home/cmc/stagingpasswd
|
|
||||||
- /home/cmc/staging/run_docker_stg.sh
|
|
||||||
environment:
|
|
||||||
name: staging
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
deploy_production:
|
deploy_production:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
|
|
@ -30,6 +17,5 @@ deploy_production:
|
||||||
- /home/cmc/cmc-sales/run_docker_prd.sh
|
- /home/cmc/cmc-sales/run_docker_prd.sh
|
||||||
environment:
|
environment:
|
||||||
name: production
|
name: production
|
||||||
when: manual
|
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
ID=$(docker ps -qf ancestor='cmc:latest')
|
ID=$(docker ps -qf ancestor='cmc:latest')
|
||||||
docker kill $ID
|
docker kill $ID
|
||||||
sleep 1
|
sleep 1
|
||||||
docker run -d -p 127.0.0.1:8888:80 \
|
docker run -d --restart always -p 127.0.0.1:8888:80 \
|
||||||
--mount type=bind,source=/mnt/vault/pdf,target=/var/www/cmc-sales/app/webroot/pdf \
|
--mount type=bind,source=/mnt/vault/pdf,target=/var/www/cmc-sales/app/webroot/pdf \
|
||||||
--mount type=bind,source=/mnt/vault/attachments_files,target=/var/www/cmc-sales/app/webroot/attachments_files \
|
--mount type=bind,source=/mnt/vault/attachments_files,target=/var/www/cmc-sales/app/webroot/attachments_files \
|
||||||
--mount type=bind,source=/mnt/vault/emails,target=/var/www/emails \
|
--mount type=bind,source=/mnt/vault/emails,target=/var/www/emails \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue