first claude draft
This commit is contained in:
35
services/alerts/Dockerfile
Normal file
35
services/alerts/Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# Multi-stage Dockerfile for Alerts service
|
||||
|
||||
FROM python:3.11-slim as base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY services/alerts/requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY shared /app/shared
|
||||
COPY proto /app/proto
|
||||
|
||||
COPY services/alerts /app/services/alerts
|
||||
|
||||
ENV PYTHONPATH=/app
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# =============================================================================
|
||||
FROM base as development
|
||||
|
||||
RUN pip install --no-cache-dir watchfiles
|
||||
|
||||
CMD ["python", "-m", "watchfiles", "python services/alerts/main.py", "/app/services/alerts"]
|
||||
|
||||
# =============================================================================
|
||||
FROM base as production
|
||||
|
||||
RUN useradd --create-home --shell /bin/bash appuser
|
||||
USER appuser
|
||||
|
||||
CMD ["python", "services/alerts/main.py"]
|
||||
Reference in New Issue
Block a user