From 6ba5b33820072493bc1e9c4a3cf6ce7d282b6de4 Mon Sep 17 00:00:00 2001 From: Moe Date: Fri, 28 Aug 2020 15:29:55 -0700 Subject: [PATCH] add plugin key handling to Dockerfile --- Docker/init.sh | 2 +- Dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Docker/init.sh b/Docker/init.sh index 2858a5d1..24c0882a 100644 --- a/Docker/init.sh +++ b/Docker/init.sh @@ -71,7 +71,7 @@ if [ ! -e "./conf.json" ]; then sudo cp conf.sample.json conf.json fi sudo sed -i -e 's/change_this_to_something_very_random__just_anything_other_than_this/'"$cronKey"'/g' conf.json -node tools/modifyConfiguration.js cpuUsageMarker=CPU subscriptionId=$SUBSCRIPTION_ID thisIsDocker=true +node tools/modifyConfiguration.js cpuUsageMarker=CPU subscriptionId=$SUBSCRIPTION_ID thisIsDocker=true pluginKeys="$PLUGIN_KEYS" sudo cp conf.json /config/conf.json diff --git a/Dockerfile b/Dockerfile index ca226d04..b7ce55c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ ENV DB_USER=majesticflame \ DB_ROOT_PASSWORD=mizukagesbluedress \ DB_ROOT_USER=root \ SUBSCRIPTION_ID=sub_XXXXXXXXXXXX \ + PLUGIN_KEYS='{}' \ DB_DISABLE_INCLUDED=false ARG DEBIAN_FRONTEND=noninteractive @@ -16,7 +17,7 @@ RUN apt update -y RUN apt install wget curl net-tools -y # Install MariaDB server... the debian way -RUN set -ex; \ +RUN if [ "$DB_DISABLE_INCLUDED" = "false" ] ; then set -ex; \ { \ echo "mariadb-server" mysql-server/root_password password '${DB_ROOT_PASSWORD}'; \ echo "mariadb-server" mysql-server/root_password_again password '${DB_ROOT_PASSWORD}'; \ @@ -28,9 +29,9 @@ RUN set -ex; \ ; \ find /etc/mysql/ -name '*.cnf' -print0 \ | xargs -0 grep -lZE '^(bind-address|log)' \ - | xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/' + | xargs -rt -0 sed -Ei 's/^(bind-address|log)/#&/'; fi -RUN sed -ie "s/^bind-address\s*=\s*127\.0\.0\.1$/#bind-address = 0.0.0.0/" /etc/mysql/my.cnf +RUN if [ "$DB_DISABLE_INCLUDED" = "false" ] ; then sed -ie "s/^bind-address\s*=\s*127\.0\.0\.1$/#bind-address = 0.0.0.0/" /etc/mysql/my.cnf; fi # Install FFmpeg