2016-10-20 16:55:05 +03:00
|
|
|
#! /usr/bin/env bash
|
2016-10-20 18:04:32 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# Prelude - make bash behave sanely
|
|
|
|
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
|
|
#
|
2016-10-20 18:25:00 +03:00
|
|
|
set -x
|
2016-10-20 18:04:32 +03:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
INCLUDE=$(dirname $(readlink -f $0))
|
|
|
|
. $INCLUDE/setup_tools
|
|
|
|
|
2016-10-21 13:50:37 +03:00
|
|
|
docker login -e="." -u="$_DOCKER_LOGIN_USERNAME" -p="$_DOCKER_LOGIN_PASSWORD" $_DOCKER_REGISTRY
|
|
|
|
curl -sSL https://raw.githubusercontent.com/tomgco/captain/master/install.sh | bash
|
|
|
|
export PATH=$HOME/.captain/bin:$PATH
|
2016-10-21 14:17:04 +03:00
|
|
|
git stash -u
|
2016-10-21 16:30:40 +03:00
|
|
|
captain build -N $_DOCKER_REGISTRY/yldio/joyent-dashboard-
|
|
|
|
captain push -N $_DOCKER_REGISTRY/yldio/joyent-dashboard-
|
2016-10-21 14:17:04 +03:00
|
|
|
git stash apply
|
2016-10-20 16:55:05 +03:00
|
|
|
|
2016-10-21 14:04:59 +03:00
|
|
|
ensure_command triton
|
|
|
|
ensure_triton_cns_is_enabled
|
|
|
|
get_triton_details
|
|
|
|
write_env_file
|
|
|
|
|
2016-10-20 16:55:05 +03:00
|
|
|
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
|