Compare commits

..

No commits in common. "ca13f510253e545f5d8a3a7c058340ee4347e061" and "f8d81453386ca942c321cba5704d64e148b3ed2c" have entirely different histories.

2 changed files with 11 additions and 23 deletions

View file

@ -4,10 +4,10 @@ LABEL maintainer="Deokgyu Yang <secugyu@gmail.com>" \
RUN apk update
RUN apk add --no-cache \
bash bash-completion supervisor tzdata shadow git openssh-client \
bash bash-completion supervisor tzdata shadow \
php82 php82-fpm php82-session php82-json php82-xml php82-mbstring php82-exif \
php82-intl php82-gd php82-pecl-imagick php82-zip php82-opcache \
ffmpeg imagemagick zip apache2-utils patch
ffmpeg imagemagick zip apache2-utils patch git
# Environments
ENV PUID=911
@ -16,7 +16,15 @@ ENV TZ='Europe/Berlin'
ENV HTPASSWD='false'
ENV HTPASSWD_USER='guest'
ENV HTPASSWD_PW=''
ENV GIT_REPO="https://code.shork.eu/shork.eu/Branding.git"
# Git repository argument (default empty)
ARG REPO_URL=""
RUN if [ -n "$REPO_URL" ]; then \
git clone "$REPO_URL" /tmp/cloned && \
mkdir -p /h5ai && \
cp -r /tmp/cloned/* /h5ai && \
rm -rf /tmp/cloned; \
fi
# Copy configuration files
COPY config/h5ai.conf /etc/nginx/conf.d/h5ai.conf

View file

@ -75,26 +75,6 @@ msg "Set permission for caching..."
chmod -R 777 $conf_h5ai/public/cache
chmod -R 777 $conf_h5ai/private/cache
# Clone external repository into /h5ai
if [ -n "$GIT_REPO" ]; then
msg "Git repository variable detected: $GIT_REPO"
workdir="/tmp/cloned"
rm -rf "$workdir"
mkdir -p "$workdir"
if git clone "$GIT_REPO" "$workdir"; then
msg "Repository cloned to $workdir"
mkdir -p /h5ai
find /h5ai -mindepth 1 -maxdepth 1 -exec rm -rf {} + 2>/dev/null || true
cp -a "$workdir"/. /h5ai/
chown -R abc:abc /h5ai
msg "Copied cloned repository contents into /h5ai"
else
msg "Failed to clone $GIT_REPO"
fi
else
msg "No GIT_REPO provided; skipping clone step"
fi
# If an user wants to set htpasswd
if [ "$HTPASSWD" = "true" ]; then
if [ ! -f "$conf_htpwd" ]; then