feat: open source multi-user AI notebook with observability
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
FROM node:22-alpine AS frontend
|
||||
WORKDIR /build/frontend
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm install --no-audit --no-fund
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM python:3.12-slim AS runtime
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
DATA_DIR=/app/data \
|
||||
USERS_FILE=/run/secrets/users.json \
|
||||
SESSION_SECRET_FILE=/run/secrets/session_secret \
|
||||
DEEPSEEK_API_KEY_FILE=/run/secrets/deepseek_api_key \
|
||||
COOKIE_SECURE=true
|
||||
WORKDIR /app
|
||||
RUN addgroup --system note && adduser --system --ingroup note note
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY app ./app
|
||||
COPY --from=frontend /build/app/static ./app/static
|
||||
RUN mkdir -p /app/data && chown -R note:note /app
|
||||
USER note
|
||||
EXPOSE 8000
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3)"
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips", "*"]
|
||||
Reference in New Issue
Block a user