FROM python:3.11-slim

WORKDIR /app

# System deps (curl for healthchecks/debug if needed)
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*

COPY temporal/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy Temporal code
COPY temporal /app/temporal

# Always run worker here; SDK clients will trigger workflows via gRPC.
CMD ["python", "-m", "temporal.worker"]
