1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-28 14:10:04 +02:00
copilot/bin/deploy
Tom Gallacher 648caa4dd4 deploy: add docker login
This commit also includes the required format changes to ensure that we
can push from docker compose. This means that we needed to update the
docker-compose.yml files to version 2.0
2016-10-20 16:58:09 +01:00

28 lines
597 B
Bash
Executable File

#! /usr/bin/env bash
#
# Prelude - make bash behave sanely
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
#
set -x
set -euo pipefail
INCLUDE=$(dirname $(readlink -f $0))
. $INCLUDE/setup_tools
ensure_command triton
ensure_triton_cns_is_enabled
get_triton_details
write_env_file
docker-compose build
docker login -e="." -u="$_DOCKER_LOGIN_USERNAME" -p="$_DOCKER_LOGIN_PASSWORD" $_DOCKER_REGISTRY
docker-compose push
export DOCKER_HOST=$_DOCKER_HOST
export DOCKER_CERT_PATH=$_DOCKER_CERT_PATH
export DOCKER_TLS_VERIFY=$_DOCKER_TLS_VERIFY
docker-compose pull
docker-compose up -d