seems to be the last RC - this app is done - so am I

This commit is contained in:
nocci 2025-05-09 14:34:33 +02:00
parent 1506201913
commit f5b184fe54
37 changed files with 1932 additions and 661 deletions

View file

@ -2,13 +2,25 @@ FROM python:3.10-slim
SHELL ["/bin/bash", "-c"]
RUN apt-get update && apt-get install -y --no-install-recommends wget && mkdir -p /app/static && wget -O /app/static/logo.webp "https://drop.nocadmin.net/logo.webp" && wget -O /app/static/logo_small.webp "https://drop.nocadmin.net/logo_small.webp" && wget -O /app/static/forgejo.webp "https://drop.nocadmin.net/forgejo.webp" && wget -O /app/static/gog_logo.webp "https://drop.nocadmin.net/gog_logo.webp" && wget -O /app/static/logo_small_maskable.webp "https://drop.nocadmin.net/logo_small_maskable.webp" && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
wget \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/data && chown -R 1000:1000 /app/data
RUN apt-get update && apt-get install -y locales && \
sed -i '/de_DE.UTF-8/s/^# //' /etc/locale.gen && \
locale-gen
ENV LC_ALL=de_DE.UTF-8 LANG=de_DE.UTF-8
ENV TZ=
RUN ln -snf /usr/share/zoneinfo/ /etc/localtime && echo > /etc/timezone
RUN mkdir -p /app/data && \
chown -R 1000:1000 /app/data
ENV TZ=${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
WORKDIR /app
COPY requirements.txt .
@ -18,10 +30,14 @@ COPY . .
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID appuser && useradd -u $UID -g $GID -m appuser && chown -R appuser:appuser /app
RUN groupadd -g ${GID} appuser && \
useradd -l -o -u ${UID} -g appuser -m appuser && \
mkdir -p /app && \
chown -R appuser:appuser /app
USER appuser
EXPOSE 5000
EXPOSE 5000 5678
ENTRYPOINT ["/app/entrypoint.sh"]
CMD ["gunicorn", "-b", "0.0.0.0:5000", "app:app"]