Add Dockerfile
This commit is contained in:
parent
f19b2b4965
commit
95e99f1c1d
1 changed files with 25 additions and 0 deletions
25
Dockerfile
Normal file
25
Dockerfile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Use a lightweight Python image
|
||||
FROM python:3.11-slim
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies (optional but safe)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements first (better Docker caching)
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY app.py .
|
||||
|
||||
# Expose the port Gunicorn will listen on
|
||||
EXPOSE 3001
|
||||
|
||||
# Run Gunicorn
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:3001", "app:app"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue