Compare commits
No commits in common. "ca13f510253e545f5d8a3a7c058340ee4347e061" and "f8d81453386ca942c321cba5704d64e148b3ed2c" have entirely different histories.
ca13f51025
...
f8d8145338
2 changed files with 11 additions and 23 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -4,10 +4,10 @@ LABEL maintainer="Deokgyu Yang <secugyu@gmail.com>" \
|
||||||
|
|
||||||
RUN apk update
|
RUN apk update
|
||||||
RUN apk add --no-cache \
|
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 php82-fpm php82-session php82-json php82-xml php82-mbstring php82-exif \
|
||||||
php82-intl php82-gd php82-pecl-imagick php82-zip php82-opcache \
|
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
|
# Environments
|
||||||
ENV PUID=911
|
ENV PUID=911
|
||||||
|
|
@ -16,7 +16,15 @@ ENV TZ='Europe/Berlin'
|
||||||
ENV HTPASSWD='false'
|
ENV HTPASSWD='false'
|
||||||
ENV HTPASSWD_USER='guest'
|
ENV HTPASSWD_USER='guest'
|
||||||
ENV HTPASSWD_PW=''
|
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 configuration files
|
||||||
COPY config/h5ai.conf /etc/nginx/conf.d/h5ai.conf
|
COPY config/h5ai.conf /etc/nginx/conf.d/h5ai.conf
|
||||||
|
|
|
||||||
|
|
@ -75,26 +75,6 @@ msg "Set permission for caching..."
|
||||||
chmod -R 777 $conf_h5ai/public/cache
|
chmod -R 777 $conf_h5ai/public/cache
|
||||||
chmod -R 777 $conf_h5ai/private/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 an user wants to set htpasswd
|
||||||
if [ "$HTPASSWD" = "true" ]; then
|
if [ "$HTPASSWD" = "true" ]; then
|
||||||
if [ ! -f "$conf_htpwd" ]; then
|
if [ ! -f "$conf_htpwd" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue