1 / Dockerfile
office-365's picture
Update Dockerfile
9713cf0 verified
raw
history blame contribute delete
No virus
472 Bytes
# Menggunakan image python versi 3.9
FROM python:3.9
# Menetapkan direktori kerja
WORKDIR /app
# Menyalin file requirements.txt dan menginstal dependensi
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Menyalin seluruh isi direktori proyek ke /app
COPY --chown=user . /app
# Menjalankan server FastAPI dengan Uvicorn pada port 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]