Initial commit
This commit is contained in:
20
hub/Dockerfile
Normal file
20
hub/Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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
|
||||
|
||||
# --- API image target ---
|
||||
FROM base AS api
|
||||
COPY 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 worker.py worker.py
|
||||
EXPOSE 9090
|
||||
CMD ["python", "worker.py"]
|
||||
|
||||
|
||||
9
hub/requirements.txt
Normal file
9
hub/requirements.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
fastapi==0.104.1
|
||||
uvicorn[standard]==0.24.0
|
||||
nats-py==2.6.0
|
||||
pydantic==2.5.0
|
||||
prometheus-client==0.19.0
|
||||
aiohttp==3.9.1
|
||||
requests==2.31.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user