28 lines
648 B
Docker
28 lines
648 B
Docker
FROM python:3.9-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y build-essential libpq-dev && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy requirements first for better caching
|
|
COPY ServicesRunnner/requirements.txt .
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy Prisma schema and generate client
|
|
COPY ServicesRunnner/schema.prisma .
|
|
COPY ServicesRunnner/Depends .
|
|
|
|
RUN prisma generate
|
|
|
|
# Copy the rest of the application
|
|
COPY ServicesRunnner/ .
|
|
|
|
# Set environment variables
|
|
ENV PYTHONPATH=/app
|
|
|
|
# Command to run when container starts
|
|
CMD ["python", "-m", "template.py"]
|