22 lines
398 B
Docker
22 lines
398 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY ./monitor/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy shared modules
|
|
COPY ./shared /app/shared
|
|
|
|
# Copy monitor code
|
|
COPY ./monitor /app
|
|
|
|
# Environment variables
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Expose port
|
|
EXPOSE 8000
|
|
|
|
# Run
|
|
CMD ["uvicorn", "monitor:app", "--host", "0.0.0.0", "--port", "8000", "--reload"] |