Add dockerfile
This commit is contained in:
commit
cacd9a0ba5
1 changed files with 18 additions and 0 deletions
18
dockerfile
Normal file
18
dockerfile
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Use official Python image
|
||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy requirements and install
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy app folder
|
||||||
|
COPY app/ ./app/
|
||||||
|
|
||||||
|
# Expose FastAPI port
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Command to run FastAPI via uvicorn
|
||||||
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
Loading…
Reference in a new issue