Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (27 loc) · 1.42 KB
/
Copy pathDockerfile
File metadata and controls
28 lines (27 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM node:20-alpine AS frontend
WORKDIR /src
COPY frontend/package*.json ./
RUN npm install
COPY frontend/ ./
RUN npm run build
FROM python:3.12-slim
ARG VERSION=dev
LABEL org.opencontainers.image.title="Probyte" \
org.opencontainers.image.description="Probyte: self-hosted database app (web app, API, MCP server and worker)" \
org.opencontainers.image.source="https://github.com/mpgithubcode/Probyte" \
org.opencontainers.image.url="https://github.com/mpgithubcode/Probyte" \
org.opencontainers.image.licenses="AGPL-3.0-only" \
org.opencontainers.image.version="${VERSION}"
WORKDIR /app
# pg_dump / pg_restore for backups (a newer client works with the Postgres 16 server); pdftoppm and fonts for file previews
RUN apt-get update && apt-get install -y --no-install-recommends postgresql-client poppler-utils fonts-dejavu-core && rm -rf /var/lib/apt/lists/*
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/app ./app
COPY docker ./docker
COPY --from=frontend /src/dist ./static
ENTRYPOINT ["/app/docker/entrypoint.sh"]
EXPOSE 8000
HEALTHCHECK --interval=60s --timeout=15s --start-period=120s --start-interval=5s --retries=3 CMD ["python", "/app/docker/healthcheck.py"]
# --proxy-headers: trust X-Forwarded-Proto from the reverse proxy (for Secure cookies)
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers", "--forwarded-allow-ips", "*"]