Files
echoes-of-the-ash/Dockerfile.api
2026-02-05 15:00:49 +01:00

35 lines
642 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Copy API requirements only
COPY api/requirements.txt ./
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy only API code and game data
COPY api/ ./api/
COPY data/ ./data/
COPY gamedata/ ./gamedata/
# Copy migration scripts
COPY migrations/ ./migrations/
COPY migrate_*.py ./
# Copy startup script
COPY api/start.sh ./
RUN chmod +x start.sh
# Expose port
EXPOSE 8000
# Run with auto-scaling workers
CMD ["./start.sh"]