What a mess
This commit is contained in:
36
Dockerfile.api
Normal file
36
Dockerfile.api
Normal file
@@ -0,0 +1,36 @@
|
||||
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 test suite
|
||||
COPY test_comprehensive.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"]
|
||||
Reference in New Issue
Block a user