mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 15:20:06 +02:00
38 lines
1003 B
Bash
Executable File
38 lines
1003 B
Bash
Executable File
#! /usr/bin/env bash
|
|
|
|
#
|
|
# Prelude - make bash behave sanely
|
|
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
#
|
|
set -euo pipefail
|
|
|
|
INCLUDE=$(dirname $(readlink -f $0))
|
|
. $INCLUDE/setup_tools
|
|
|
|
echo ">> Logging into $_DOCKER_REGISTRY"
|
|
docker login -e="." -u="$_DOCKER_LOGIN_USERNAME" -p="$_DOCKER_LOGIN_PASSWORD" $_DOCKER_REGISTRY
|
|
echo ">> Installing captain"
|
|
curl -sSL https://raw.githubusercontent.com/tomgco/captain/master/install.sh | bash
|
|
export PATH=$HOME/.captain/bin:$PATH
|
|
|
|
git stash -u
|
|
echo ">> running captain build"
|
|
captain build -N $_DOCKER_REGISTRY/yldio/joyent-dashboard-
|
|
echo ">> running captain push"
|
|
captain push -N $_DOCKER_REGISTRY/yldio/joyent-dashboard-
|
|
git stash apply
|
|
|
|
|
|
echo ">> running triton deploy with docker-compose"
|
|
ensure_command triton
|
|
ensure_triton_cns_is_enabled
|
|
get_triton_details
|
|
write_env_file
|
|
|
|
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
|