Stoic-2910 commited on
Commit
b7af91e
·
verified ·
1 Parent(s): 169d4d5

Delete Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -38
Dockerfile DELETED
@@ -1,38 +0,0 @@
1
- # Stage 1: Build dependencies
2
- FROM ghcr.io/astral-sh/uv:python3.11-slim AS builder
3
-
4
- # Enable bytecode compilation and use copy instead of hardlinks
5
- ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
6
-
7
- WORKDIR /app
8
-
9
- # Copy configuration files
10
- COPY pyproject.toml uv.lock ./
11
-
12
- # Install dependencies into a virtual environment
13
- RUN uv sync --frozen --no-dev
14
-
15
- # Stage 2: Runtime
16
- FROM python:3.11-slim AS runtime
17
-
18
- WORKDIR /app
19
-
20
- # Copy the virtual environment from the builder
21
- COPY --from=builder /app/.venv /app/.venv
22
-
23
- # Ensure the virtual environment is in the PATH
24
- ENV PATH="/app/.venv/bin:$PATH"
25
-
26
- # Create non-root user for security
27
- RUN useradd -m -u 1001 appuser
28
-
29
- # Copy application code
30
- COPY app/ ./app/
31
-
32
- # Switch to non-root user
33
- USER appuser
34
-
35
- EXPOSE 8000
36
-
37
- # Run the application using uvicorn from the virtual environment
38
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"]