V2: Added Webserver for faster formatting
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
FROM python:3.11-slim-bookworm
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir --requirement requirements.txt
|
||||
|
||||
ARG APP_UID=1000
|
||||
ARG APP_GID=1000
|
||||
RUN groupadd --gid "${APP_GID}" roster \
|
||||
&& useradd --uid "${APP_UID}" --gid roster --create-home --shell /usr/sbin/nologin roster \
|
||||
&& mkdir -p /app/output \
|
||||
&& chown -R roster:roster /app
|
||||
|
||||
COPY --chown=roster:roster main.py roster_formatter.py server.py ./
|
||||
COPY --chown=roster:roster modules/ ./modules/
|
||||
COPY --chown=roster:roster utils/ ./utils/
|
||||
COPY --chown=roster:roster assets/ ./assets/
|
||||
COPY --chown=roster:roster web/ ./web/
|
||||
|
||||
USER roster
|
||||
|
||||
EXPOSE 8787
|
||||
|
||||
CMD ["python", "server.py", "--host", "0.0.0.0", "--port", "8787"]
|
||||
Reference in New Issue
Block a user