Add apache2-utils to Dockerfile and implement htpasswd file creation in entrypoint script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -14,7 +14,7 @@ FROM alpine:latest
|
||||
# COPY --from=redis-source /usr/src/redis/src/redis-cli /usr/bin/redis-cli
|
||||
# RUN chmod +x /usr/bin/redis-cli
|
||||
|
||||
RUN apk add --update --no-cache docker-cli wget curl dos2unix jq openssl git coreutils inotify-tools acl
|
||||
RUN apk add --update --no-cache docker-cli wget curl dos2unix jq openssl git coreutils inotify-tools acl apache2-utils
|
||||
|
||||
COPY scripts/scheduler/*.sh /scripts/
|
||||
RUN find ./scripts -name "*.sh" | xargs dos2unix
|
||||
|
||||
@@ -30,6 +30,7 @@ REDIS_VERSION=${REDIS_VERSION:-latest}
|
||||
|
||||
SOURCE=${SOURCE:-user-config}
|
||||
SMARTHOST_PROXY_PATH=$SMARTHOST_PROXY_PATH
|
||||
HTPASSWD_FILE=${HTPASSWD_FILE:-/etc/system/config/smarthost-proxy/nginx/htpasswd}
|
||||
|
||||
GIT_URL=${GIT_URL:-git.format.hu}
|
||||
REPO=$REPO
|
||||
@@ -99,6 +100,19 @@ if [ -d /etc/user/config/services ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
create_htpasswd_file() {
|
||||
|
||||
local USER="$1"
|
||||
local PASSWD="$2"
|
||||
|
||||
if [ ! -f "$HTPASSWD_FILE" ]; then
|
||||
install -m 664 -g 65534 /dev/null $HTPASSWD_FILE
|
||||
htpasswd -cb $HTPASSWD_FILE $USER $PASSWD
|
||||
fi
|
||||
}
|
||||
|
||||
install -m 664 -g 65534 /dev/null
|
||||
|
||||
deploy_additionals() {
|
||||
|
||||
local DIR="$1"
|
||||
@@ -548,7 +562,6 @@ upgrade() {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
execute_task() {
|
||||
TASK="$1"
|
||||
B64_JSON="$2"
|
||||
|
||||
Reference in New Issue
Block a user