diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c313d21 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.9 + +WORKDIR /app + +COPY . . +RUN pip install gunicorn && pip install -r requirements.txt +EXPOSE 8000 + +CMD ["gunicorn", "-b", "0.0.0.0:8000", "app:app"] \ No newline at end of file diff --git a/README.md b/README.md index 7cfe779..6d8448f 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,16 @@ pdm run app.py pip install -r requirements.txt python app.py ``` + + + +
+docker +```bash +docker build -t mcstatus-api . +docker run --name mcstatus-api -p 8000:8000 -d mcstatus-api +``` +
## 🖊下一步计划