Setup docker registry url variable.

This commit is contained in:
2021-10-08 07:24:15 +02:00
parent 7e97be1f9c
commit 966ab57278
2 changed files with 22 additions and 1 deletions

View File

@@ -1,8 +1,10 @@
# Initial parameters
DATE=`date +%F-%H-%M-%S`
TIMEOUT=$TIMEOUT
RESTART=$RESTART
RESTART_COUNTER=0
DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL
# Set env variables
DOMAIN="$1"
@@ -11,6 +13,15 @@ ROLE=$ROLE
SERVICE_NAME=$SERVICE_NAME
PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR
# Setup docker registry url path
if [[ ! -n "$DOCKER_REGISTRY_URL" && "$DOCKER_REGISTRY_URL" != "null" ]] ; then
SETUP="'/setup'";
else
SETUP="setup";
$DOCKER_REGISTRY_URL="";
fi
service_exec="docker run --rm -v /etc/user/config/services/:/services/:ro -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker:ro registry.format.hu/setup /scripts/service-exec"
do_proxy_restart() {