Add local development Dockerfile and fallback for build metadata

This commit is contained in:
Christian Krakau-Louis
2026-02-08 08:32:08 +01:00
parent 35fbd4fdef
commit aa953f2f36
2 changed files with 34 additions and 6 deletions
+34
View File
@@ -0,0 +1,34 @@
# Local development Dockerfile (avoids CI-only build metadata files)
FROM python:3.14.1 AS builder
WORKDIR /app
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
FROM python:3.14.1-slim
WORKDIR /app
COPY --from=builder /usr/local/lib/python3.14/site-packages /usr/local/lib/python3.14/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
COPY ./app /app/app
COPY ./frontend /app/frontend
COPY ./LICENSE /app/LICENSE
COPY ./VERSION /app/VERSION
COPY ./BUILD_DATE /app/BUILD_DATE
# Local fallbacks for build metadata
RUN echo "local" > /app/GIT_SHA \
&& echo "local" > /app/RUNTIME_INFO
RUN mkdir -p /app/runtime_info
RUN mkdir -p /workdir
ENV PYTHONPATH=/app
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
-6
View File
@@ -110,12 +110,6 @@ async def settings_page(request: Request, db: Session = Depends(get_db)):
"app_version": settings.version
}
)
{
"request": request,
"settings_data": settings_data,
"app_version": settings.version
}
)
except Exception as e:
logger.error(f"Error loading settings page: {e}")
raise HTTPException(