intesa_splunk_main/api/Dockerfile

18 lines
495 B
Docker

# api/Dockerfile
FROM python:3.12-slim
WORKDIR /app
# deps
COPY api/requirements.txt .
RUN python -m pip install --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r requirements.txt
# app code (put everything at /app so imports stay "from notify import send_email")
COPY api/agent_runner.py ./agent_runner.py
COPY api/flask_app.py ./flask_app.py
COPY api/notify.py ./notify.py
ENV PYTHONUNBUFFERED=1
EXPOSE 8080
CMD ["gunicorn","-w","2","-b","0.0.0.0:8080","flask_app:app"]