fix:docker

This commit is contained in:
muhamad fais aizat 2025-05-16 14:41:08 +07:00
parent 08f2f01dee
commit 21f6e317ea
2 changed files with 17 additions and 2 deletions

15
backend/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
# Gunakan image Python versi 3.9
FROM python:3.9-slim
# Buat working directory
WORKDIR /app
# Copy requirements dan install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Salin semua file ke dalam container
COPY . .
# Jalankan Uvicorn
CMD ["uvicorn", "index:app", "--host", "0.0.0.0", "--port", "8000"]

View File

@ -2,8 +2,8 @@
"version": 2,
"builds": [
{
"src": "index.py",
"use": "@vercel/python"
"src": "Dockerfile",
"use": "@vercel/docker"
}
],
"routes": [