You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
475 B
20 lines
475 B
# Official Python image
|
|
FROM python:3.12-slim
|
|
|
|
# Set workdir
|
|
WORKDIR /app
|
|
|
|
# Copy the file with the requirements
|
|
COPY requirements.txt .
|
|
|
|
# Install the package dependencies in the requirements file.
|
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
|
|
# Copy the FastAPI app folder in the container
|
|
COPY . .
|
|
|
|
# Expose API port
|
|
EXPOSE 80
|
|
|
|
# Launches the uvicorn server (command from offical FastAPI documentation)
|
|
CMD ["fastapi", "run", "app/main.py", "--port", "80"] |