From f626f9b046e028d7e910db3793fe28563ffde87c Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 29 May 2021 11:30:35 +0200 Subject: [PATCH] Renamed env vars --- Dockerfile | 2 +- config/docker/servers.json_from_env.sh | 16 ---------------- scripts/docker/servers.json_from_env.sh | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 17 deletions(-) delete mode 100755 config/docker/servers.json_from_env.sh create mode 100755 scripts/docker/servers.json_from_env.sh diff --git a/Dockerfile b/Dockerfile index 682bbbd5..dfe37fd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,5 @@ FROM nginx:1.19.6-alpine LABEL maintainer="Alejandro Celaya " RUN rm -r /usr/share/nginx/html && rm /etc/nginx/conf.d/default.conf COPY config/docker/nginx.conf /etc/nginx/conf.d/default.conf -COPY config/docker/servers.json_from_env.sh /docker-entrypoint.d/30-shlink-servers-json.sh +COPY scripts/docker/servers.json_from_env.sh /docker-entrypoint.d/30-shlink-servers-json.sh COPY --from=node /shlink-web-client/build /usr/share/nginx/html diff --git a/config/docker/servers.json_from_env.sh b/config/docker/servers.json_from_env.sh deleted file mode 100755 index 170e33f6..00000000 --- a/config/docker/servers.json_from_env.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -ME=$(basename $0) - -setup_single_shlink_server() { - [ -n "$SHLINK_CLIENT_SERVER_URL" ] || return 0 - [ -n "$SHLINK_CLIENT_API_KEY" ] || return 0 - local name="${SHLINK_CLIENT_SERVER_NAME:-Shlink}" - echo "[{\"name\":\"${name}\",\"url\":\"${SHLINK_CLIENT_SERVER_URL}\",\"apiKey\":\"${SHLINK_CLIENT_API_KEY}\"}]" > /usr/share/nginx/html/servers.json -} - -setup_single_shlink_server - -exit 0 diff --git a/scripts/docker/servers.json_from_env.sh b/scripts/docker/servers.json_from_env.sh new file mode 100755 index 00000000..4275f591 --- /dev/null +++ b/scripts/docker/servers.json_from_env.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +ME=$(basename $0) + +setup_single_shlink_server() { + [ -n "$SHLINK_SERVER_URL" ] || return 0 + [ -n "$SHLINK_SERVER_API_KEY" ] || return 0 + local name="${SHLINK_SERVER_NAME:-Shlink}" + echo "[{\"name\":\"${name}\",\"url\":\"${SHLINK_SERVER_URL}\",\"apiKey\":\"${SHLINK_SERVER_API_KEY}\"}]" > /usr/share/nginx/html/servers.json +} + +setup_single_shlink_server + +exit 0