-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 844 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 844 Bytes
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
29
30
31
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml uv.lock* ./
COPY databricks_zerobus-0.0.17-py3-none-any.whl ./
RUN pip install --upgrade pip && \
pip install fastapi uvicorn python-dotenv grpcio protobuf requests && \
pip install databricks_zerobus-0.0.17-py3-none-any.whl
COPY app.py stream_manager.py config.json ./
COPY tables/ ./tables/
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import requests; requests.get('http://localhost:8000/health')"
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]