Files
echoes-of-the-ash/Dockerfile.api
2025-11-27 16:27:01 +01:00

34 lines
611 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 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"]