# TODO: we may want to change our python version to 3.10 or 3.11 (something newer)

FROM --platform=linux/arm64 python:3.8

# start a new api folder
RUN mkdir /fastapi

# Grab our dependencies from the requirements.txt file
COPY requirements.txt /fastapi

WORKDIR /fastapi

# install of the requirments that we need
RUN pip install -r requirements.txt

# Copy over all of our source files (this includes all the models as well)
COPY . /fastapi

EXPOSE 8000

# expose port 8000 and run the server (we should set this to port 8080 in production)
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
