feat: project skeleton
- infra (k8s, kind, helm, docker) backbone is implemented - security: implementation + unit tests are done
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
# Multi-stage Dockerfile for API and Worker services
|
||||
FROM python:3.14-slim AS base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
# Install Python dependencies
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv sync --no-cache --no-dev
|
||||
|
||||
# Copy application code
|
||||
COPY app/ ./app/
|
||||
COPY worker/ ./worker/
|
||||
COPY migrations/ ./migrations/
|
||||
|
||||
# API service target
|
||||
FROM base AS api
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uv", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
# Worker service target
|
||||
FROM base AS worker
|
||||
|
||||
CMD ["uv", "run", "celery", "-A", "worker.celery_app", "worker", "--loglevel=info", "-Q", "critical,default,low"]
|
||||
Reference in New Issue
Block a user