miom.space/deploy.sh
teutat3s 5d687650b9
All checks were successful
continuous-integration/drone/push Build is passing
Add back missing docker login step
2023-02-27 17:45:53 +01:00

30 lines
633 B
Bash
Executable file

#!/usr/bin/env bash
# Abort on first error
set -e
TAG="$1"
if [[ -z "$TAG" ]]; then
echo
echo "Error: please provide a version as docker image tag as first argument, e.g.:"
echo "./deploy.sh 1.0.0"
echo
echo "You can check the currently deployed tag with"
echo 'docker ps --format "{{.Names}}: {{.Image}}"'
echo
exit 1
fi
# Login to Greenbaum's private docker registry
docker login registry.greenbaum.cloud
# Use our tag for docker-compose
export DEPLOY_TAG="$TAG"
# Pull the latest image
docker pull registry.greenbaum.cloud/pub_solar/miom.space:"$DEPLOY_TAG"
# Deploy on Greenbaum Cloud
docker-compose up -d