Aliashraf commited on
Commit
3ddc4e7
·
verified ·
1 Parent(s): 527b8e2

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +16 -0
dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+ RUN apt-get update && apt-get install -y \
3
+ build-essential \
4
+ libffi-dev \
5
+ libssl-dev \
6
+ curl \
7
+ && apt-get clean \
8
+ && rm -rf /var/lib/apt/lists/*
9
+ WORKDIR /app
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+ COPY app.py .
13
+ EXPOSE 8000
14
+ HEALTHCHECK --interval=30s --timeout=15s --start-period=60s --retries=3 \
15
+ CMD curl -f http://localhost:8000/health || exit 1
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--log-level", "info"]