add: docker support.

This commit is contained in:
GiriNeko 2025-08-25 10:34:56 +08:00
parent ce3b4ff2a5
commit c9d4633b9c
2 changed files with 19 additions and 0 deletions

9
Dockerfile Normal file
View file

@ -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"]

View file

@ -37,6 +37,16 @@ pdm run app.py
pip install -r requirements.txt
python app.py
```
</details>
<details open>
<summary>docker</summary>
```bash
docker build -t mcstatus-api .
docker run --name mcstatus-api -p 8000:8000 -d mcstatus-api
```
</details>
## 🖊下一步计划