Files
Shadowbroker/backend/Dockerfile
T
anoracleofra-code f9a8a998c4 feat: add Docker publishing via GitHub Actions
Former-commit-id: 38d92ac6cc
2026-03-08 14:04:52 -06:00

24 lines
448 B
Docker

FROM python:3.10-slim
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source code
COPY . .
# Create a non-root user for security
RUN adduser --system --uid 1001 backenduser \
&& chown -R backenduser /app
# Switch to the non-root user
USER backenduser
# Expose port
EXPOSE 8000
# Start FastAPI server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]