Newer
Older
- docker push l1ll1/strudel2_backend:$CI_COMMIT_BRANCH
deploy_test:
stage: deploy
only:
tags:
- deploy_test
variables:
DOCKER_HOST: unix:///var/run/docker.sock
- echo "deploying dev"
- docker login -u $DOCKERHUBUSER -p $DOCKERHUBPASSWORD docker.io
- docker stop strudel2_backend || echo "Failed to stop existing container"
- docker ps -a -q | xargs -I{} docker rm {} || echo "No containers to remove"
- docker images -q | xargs -I{} docker rmi {} || echo "No images to remove"
- docker pull l1ll1/strudel2_backend:latest
- docker run --mount type=bind,source=/messages,target=/messages -d -p 8080:8080 -p 8090:8090 --name strudel2_backend l1ll1/strudel2_backend:latest || echo "Unable to start image ... possibly the old wsgi process is still running?"
dependencies:
- build
deploy_dev:
stage: deploy
variables:
DOCKER_HOST: unix:///var/run/docker.sock
script:
- echo "deploying dev"
- docker login -u $DOCKERHUBUSER -p $DOCKERHUBPASSWORD docker.io
- docker stop strudel2_backend || echo "Failed to stop existing container"
- docker ps -a -q | xargs -I{} docker rm {} || echo "No containers to remove"
- docker images -q | xargs -I{} docker rmi {} || echo "No images to remove"
- docker pull l1ll1/strudel2_backend:$CI_COMMIT_BRANCH
- docker run --mount type=bind,source=/messages,target=/messages -d -p 8080:8080 -p 8090:8090 --name strudel2_backend l1ll1/strudel2_backend:$CI_COMMIT_BRANCH || echo "Unable to start image ... possibly the old wsgi process is still running?"