FROM python:3.12-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PIP_DISABLE_PIP_VERSION_CHECK=1 \ SITEFORGE_DATA_DIR=/data ARG SITEFORGE_GIT_SHA=unknown ENV SITEFORGE_GIT_SHA=${SITEFORGE_GIT_SHA} LABEL org.opencontainers.image.revision=${SITEFORGE_GIT_SHA} WORKDIR /opt/siteforge COPY requirements.lock ./ RUN pip install --no-cache-dir -r requirements.lock && \ groupadd -g 10001 siteforge && useradd -u 10001 -g 10001 -s /usr/sbin/nologin siteforge && \ mkdir -p /data /published && chown -R siteforge:siteforge /data /published COPY --chown=siteforge:siteforge app/ ./app/ COPY --chown=siteforge:siteforge themes/ ./themes/ COPY --chown=siteforge:siteforge examples/ ./examples/ USER siteforge EXPOSE 8787 CMD ["python","-m","uvicorn","app.main:app","--host","0.0.0.0","--port","8787","--proxy-headers","--forwarded-allow-ips","*"]