Commit c4b3a191 authored by Jacob Priddy's avatar Jacob Priddy 👌
Browse files

Move the deploy script wholy to the gitlab ci as it causes issues

being in a file by itself
parent 9e628a31
Pipeline #9838 canceled with stages
in 2 minutes and 13 seconds
......@@ -67,7 +67,13 @@ deploy_backend_production:
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- SSH_COMMAND_STRING="cd doorcode && bin/deploy-update.sh"
- SSH_COMMAND_STRING="cd doorcode"
# get newest changes
- SSH_COMMAND_STRING+=" && git pull
# restart containers for any changes to docker compose
- 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}"
......
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "${DIR}/.." || exit 1
git pull || exit 1
docker-compose restart || docker-compose up -d || exit 1
# the -T fixes the input device is not a TTY .. see https://github.com/docker/compose/issues/5696
docker-compose exec -T api ./update-prod.sh || exit 1
Supports Markdown
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