Initial commit
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# syntax=docker/dockerfile:1.5
|
||||
|
||||
FROM python:3.11-slim AS base
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN apt-get update && apt-get install -y tzdata && rm -rf /var/lib/apt/lists/*
|
||||
ENV TZ=Asia/Kolkata
|
||||
|
||||
# --- API image target ---
|
||||
FROM base AS api
|
||||
COPY hub/app.py app.py
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
|
||||
|
||||
# --- Worker image target ---
|
||||
FROM base AS worker
|
||||
COPY hub/worker.py worker.py
|
||||
EXPOSE 9090
|
||||
CMD ["python", "worker.py"]
|
||||
|
||||
Reference in New Issue
Block a user