fix:docker
This commit is contained in:
parent
08f2f01dee
commit
21f6e317ea
|
@ -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"]
|
|
@ -2,8 +2,8 @@
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"builds": [
|
"builds": [
|
||||||
{
|
{
|
||||||
"src": "index.py",
|
"src": "Dockerfile",
|
||||||
"use": "@vercel/python"
|
"use": "@vercel/docker"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"routes": [
|
"routes": [
|
||||||
|
|
Loading…
Reference in New Issue