diff options
author | 2018-04-28 14:28:35 +0200 | |
---|---|---|
committer | 2018-04-28 14:28:35 +0200 | |
commit | 54369f64c628e957d6c4a6953f2407d0f3df8564 (patch) | |
tree | 64ad79ccdadb35a955c52a70131682de4f9efa28 /scripts/deploy.sh | |
parent | Add help channel 4 (diff) |
adds dockerfile that uses pipenv (#60)
Dockerfile and new deploy flow that builds the container in travis
Diffstat (limited to 'scripts/deploy.sh')
-rw-r--r-- | scripts/deploy.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/deploy.sh b/scripts/deploy.sh new file mode 100644 index 000000000..98b9a9462 --- /dev/null +++ b/scripts/deploy.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Build and deploy on master branch +if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then + echo "Connecting to docker hub" + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + echo "Building image" + docker build -t pythondiscord/bot:latest . + + echo "Pushing image" + docker push pythondiscord/bot:latest + + echo "Deploying container" + pipenv run python scripts/deploy.py +fi |