update
This commit is contained in:
parent
990f944ec6
commit
ac32800ba7
3 changed files with 80 additions and 5 deletions
20
Dockerfile
Normal file
20
Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
FROM python:3.10-slim
|
||||
|
||||
# Cài đặt các thư viện hệ thống cần thiết
|
||||
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Tạo thư mục app
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements và cài đặt
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy toàn bộ mã nguồn
|
||||
COPY . .
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
||||
# Lệnh chạy uvicorn
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue