mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-09-22 04:50:46 +02:00
Added basic docker configuration for test
This commit is contained in:
parent
0135eeeb3d
commit
a1d120f700
4 changed files with 118 additions and 1 deletions
34
Dockerfile
Normal file
34
Dockerfile
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Use Python 3.11 slim image for smaller size
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
# Install system dependencies if needed
|
||||
RUN apt-get update && apt-get install -y \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first for better caching
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY code/ ./code/
|
||||
COPY csv_files/ ./csv_files/
|
||||
COPY mypy.ini .
|
||||
|
||||
# Create necessary directories
|
||||
RUN mkdir -p deck_files logs
|
||||
|
||||
# Set the working directory to code for proper imports
|
||||
WORKDIR /app/code
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "main.py"]
|
Loading…
Add table
Add a link
Reference in a new issue