Switch to FastAPI

This commit is contained in:
2023-09-09 20:45:24 -05:00
parent 3654aebb5e
commit 72ea0126f7
9 changed files with 275 additions and 102 deletions

View File

@@ -1,16 +1,14 @@
FROM python:3.11.4-slim
# FROM continuumio/conda-ci-linux-64-python3.8
# FROM continuumio/miniconda3
# Install app
COPY . /app
WORKDIR /app
COPY . .
# Install dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
# RUN conda env create -f environment.yaml
# ENV CONDA_DEFAULT_ENV battlesnake
ENV HOST 0.0.0.0
ENV PORT 8000
ENV ROOT_PATH /
ENV SNAKE starter_snake
# Run Battlesnake
ENTRYPOINT [ "python", "server.py" ]
CMD [ "starter_snake" ]
ENTRYPOINT uvicorn src.server:app --host $HOST --port $PORT --root-path $ROOT_PATH