Commit f23b6a20 authored by Jacob Priddy's avatar Jacob Priddy 👌

fix zerodowntime deployments?

parent 9505f483
......@@ -106,16 +106,14 @@ deploy application:
- docker build --build-arg APP_IMAGE=$DOORCODE_IMAGE_NAME -t $NGINX_IMAGE_NAME -f nginx.Dockerfile .
- docker stack deploy -c docker-compose.prod.yml doorcode --prune
# Give it some time to spin up...
- sleep 30
- sleep 60
# Make sure app is running
- "curl --fail --insecure --silent --location https://${DEPLOY_ADDRESS}/api"
# API docs currently are not working
# - "curl --fail --insecure --location https://${DEPLOY_ADDRESS}/api/docs"
- "curl --fail --insecure --silent --location https://${DEPLOY_ADDRESS}/api/docs"
environment:
name: production
url: https://elock.cs.wallawalla.edu/api
on_stop: stop-prod
# when: manual
only:
- master
......@@ -129,68 +127,3 @@ stop-prod:
environment:
name: production
action: stop
#deploy_backend_production:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# - SSH_COMMAND_STRING="cd doorcode"
# # get newest changes
# - SSH_COMMAND_STRING+=" && git pull"
# - SSH_COMMAND_STRING+=" && (docker-compose restart || docker-compose up -d)"
# # the -T fixes the input device is not a TTY .. see https://github.com/docker/compose/issues/5696
# - SSH_COMMAND_STRING+=" && docker-compose exec -T api ./update-prod.sh"
# - echo "$SSH_COMMAND_STRING"
# # Execute the deploy
# - ssh $SSH_USER@$SSH_HOST "${SSH_COMMAND_STRING}"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST}/api | grep \"Welcome to the elock API.\""
# environment:
# name: production_api
# url: https://elock.cs.wallawalla.edu/api
# when: manual
# only:
# - master
#
#deploy_api_docs:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# # Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
# - "rsync -a --delete src/backend/public/docs $SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/backend/public/"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST}/api/docs/ | grep \"Welcome to the generated API reference.\""
# environment:
# name: production_api_docs
# url: https://elock.cs.wallawalla.edu/api/docs/
# when: manual
# only:
# - master
#deploy_frontend_production:
# stage: deploy
# before_script:
# - eval $(ssh-agent -s)
# - ssh-add <(echo "${SSH_PRIVATE_KEY}" | base64 -d -w 0)
# - mkdir -p ~/.ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
# script:
# # Can't use the CI job token to deploy the artifact because that's a "pRemiUm FEATurE"
# - "rsync -a --delete src/frontend/dist $SSH_USER@$SSH_HOST:/home/$SSH_USER/doorcode/src/frontend/"
# # Make sure it is running
# - "curl --insecure --location https://${SSH_HOST} | grep \"work properly without JavaScript enabled.\""
# environment:
# name: production_frontend
# url: https://elock.cs.wallawalla.edu
# when: manual
# only:
# - master
......@@ -49,15 +49,9 @@ services:
- wwu_webserver_key
- wwu_root_cert
ports:
- target: 4433
published: 4433
mode: host
- target: 443
published: 443
mode: host
- target: 80
published: 80
mode: host
- '4443:4443'
- '443:443'
- '80:80'
volumes:
- $PROJ_DIR/simple-saml/cert:/var/simplesamlphp/cert:ro
- $PROJ_DIR/simple-saml/config:/var/simplesamlphp/config:ro
......
......@@ -15,3 +15,5 @@ yarn-error.log
cov/
public/docs
resources/docs
public/css/app.css
public/js/app.js
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment