File size: 792 Bytes
04d660e
745881b
 
04d660e
 
 
 
 
 
 
 
 
 
 
745881b
 
04d660e
745881b
04d660e
 
745881b
04d660e
 
745881b
04d660e
745881b
 
04d660e
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use slim Python 3.11 image for minimal footprint
FROM python:3.11-slim

# Prevent Python buffering & set UTF-8
ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PYTHONIOENCODING=utf-8

# Install system deps (optional: for psutil)
RUN apt-get update && apt-get install -y --no-install-recommends \
    procps \
    && rm -rf /var/lib/apt/lists/*

# Create app dir
WORKDIR /app

# Install Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# Copy source
COPY phoenix_fury.py .

# Expose API port
EXPOSE 8000

# Run as non-root (optional but recommended)
RUN useradd --create-home --shell /bin/bash appuser
USER appuser

# Launch with uvloop + optimized Uvicorn
CMD ["python", "phoenix_fury.py"]