You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
737 B

#!/usr/bin/env bash
# Abort on first error
set -e
if [[ -z "$TAG" ]]; then
echo "Error: please provide a version as docker image tag as first argument, e.g.:"
echo "./ 1.0.0"
echo "You can check the currently deployed tag with"
echo 'docker ps --format "{{.Names}}: {{.Image}}"'
exit 1
# Login to Greenbaum's private docker registry
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
# Use our tag for docker-compose
export DEPLOY_TAG="$TAG"
# Pull the latest image
docker pull"$DEPLOY_TAG"
# Deploy on Greenbaum Cloud
docker-compose --project-name miomspace up --detach