Skip to content

Commit cfa6ddb

Browse files
Create Dockerfile
1 parent f759485 commit cfa6ddb

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM python:3.11-slim
2+
3+
WORKDIR /app
4+
5+
# Install system dependencies
6+
RUN apt-get update && apt-get install -y \
7+
gcc \
8+
&& rm -rf /var/lib/apt/lists/*
9+
10+
# Copy requirements first for better caching
11+
COPY requirements.txt .
12+
RUN pip install --no-cache-dir -r requirements.txt
13+
14+
# Copy application code
15+
COPY . .
16+
17+
# Create volume for database
18+
VOLUME ["/app/data"]
19+
20+
# Set environment variables
21+
ENV FLASK_APP=app.main:create_app
22+
ENV PYTHONUNBUFFERED=1
23+
24+
EXPOSE 5000
25+
26+
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--threads", "4", "app.main:create_app()"]

0 commit comments

Comments
 (0)