20 lines
294 B
Docker
20 lines
294 B
Docker
FROM python:3.9-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application files
|
|
COPY . .
|
|
|
|
# Set environment variables
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# Expose port
|
|
EXPOSE 3000
|
|
|
|
# Run the API server
|
|
CMD ["python", "cm_api.py"] |