updates to deploy testing and certbot commands
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
#set -x
|
||||
set -x
|
||||
|
||||
LETSENCRYPT_IMAGE=dkregistry.xai-corp.net:5000/xaicorp/acme-certbot
|
||||
LETSENCRYPT_MOUNT=/opt/shared/letsencrypt-2-staging
|
||||
CERT_NAME=xai-corp.net
|
||||
|
||||
export DOCKER_HOST=${DOCKER_HOST:-'dkhost:2376'}
|
||||
export LETSENCRYPT_MOUNT
|
||||
export LETSENCRYPT_IMAGE
|
||||
export CERT_NAME
|
||||
|
||||
run() {
|
||||
docker-compose \
|
||||
@@ -22,10 +24,4 @@ run_help() {
|
||||
}
|
||||
|
||||
|
||||
while getopts h name
|
||||
do
|
||||
case $name in
|
||||
h) run_help $@;;
|
||||
*) run $@;;
|
||||
esac
|
||||
done
|
||||
run $@
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
#set -x
|
||||
set -x
|
||||
|
||||
LETSENCRYPT_IMAGE=dkregistry.xai-corp.net:5000/xaicorp/acme-certbot
|
||||
LETSENCRYPT_MOUNT=/opt/shared/letsencrypt-2-staging
|
||||
CERT_NAME=xai-corp.net
|
||||
|
||||
LOG=$(mktemp)
|
||||
|
||||
@@ -25,11 +26,12 @@ update() {
|
||||
export DOCKER_HOST=${DOCKER_HOST:-'dkhost:2376'}
|
||||
export LETSENCRYPT_MOUNT
|
||||
export LETSENCRYPT_IMAGE
|
||||
export CERT_NAME
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker-compose \
|
||||
-f docker-compose.tools.yml \
|
||||
run renew ${OPTIONS}
|
||||
run --name sslproxy_renew renew ${OPTIONS}
|
||||
}
|
||||
|
||||
function trap_exit() {
|
||||
@@ -58,12 +60,12 @@ print_usage() {
|
||||
######
|
||||
|
||||
ENVIRONMENT=dev
|
||||
OPTIONS=''
|
||||
OPTIONS="--cert-name ${CERT_NAME}"
|
||||
while getopts de: name
|
||||
do
|
||||
case $name in
|
||||
d)
|
||||
OPTIONS="$OPTIONS --dryrun"
|
||||
OPTIONS="$OPTIONS --dry-run"
|
||||
;;
|
||||
e)
|
||||
if [ $OPTARG == 'prod' ]; then
|
||||
|
||||
Reference in New Issue
Block a user