diff --git a/Dockerfile b/Dockerfile index 1c74ef5..ad2a9a6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,3 +27,5 @@ RUN set -x \ COPY scripts scripts COPY sql sql COPY --from=0 /tini /tmp/scripts/tini + +USER 999 diff --git a/scripts/proxysql-entry.sh b/scripts/proxysql-entry.sh index f3155d0..5446ab3 100755 --- a/scripts/proxysql-entry.sh +++ b/scripts/proxysql-entry.sh @@ -23,15 +23,13 @@ function log() { echo "$(timestamp) [$script_name] [$log_type] $msg" } -cp /etc/custom-config/proxysql.cnf /etc/proxysql.cnf - # If command has arguments, prepend proxysql if [ "${1:0:1}" = '-' ]; then CMDARG="$@" fi # Start ProxySQL with PID 1 -exec proxysql -f $CMDARG & +exec proxysql -c /etc/custom-config/proxysql.cnf -f $CMDARG & pid=$! log "INFO" "Configuring proxysql ..."