copilot/legacy/bin/deploy

31 lines
871 B
Plaintext
Raw Normal View History

2016-10-20 16:55:05 +03:00
#! /usr/bin/env bash
#
# Prelude - make bash behave sanely
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
#
set -euo pipefail
2017-03-21 16:41:30 +02:00
# Beware of CDPATH gotchas causing cd not to work correctly when a user
# has set this in their environment
# https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
unset CDPATH
readonly INCLUDE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck source=bin/setup-tools
. "${INCLUDE}"/setup-tools
2016-10-21 19:16:18 +03:00
echo ">> running triton deploy with docker-compose"
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
2016-11-23 16:05:39 +02:00
# Do not TLS verify for now, incompatibilities between circleci and joyent
export DOCKER_TLS_VERIFY=
2016-10-20 16:55:05 +03:00
docker-compose pull
2017-03-21 18:45:32 +02:00
COMPOSE_PROJECT_NAME=${CIRCLE_BRANCH} docker-compose up -d