mirror of
https://github.com/Murasame-Dev/McStatus-API.git
synced 2025-12-16 13:17:43 +00:00
add: docker support.
This commit is contained in:
parent
ce3b4ff2a5
commit
c9d4633b9c
2 changed files with 19 additions and 0 deletions
9
Dockerfile
Normal file
9
Dockerfile
Normal 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"]
|
||||||
10
README.md
10
README.md
|
|
@ -37,6 +37,16 @@ pdm run app.py
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
python app.py
|
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>
|
</details>
|
||||||
|
|
||||||
## 🖊下一步计划
|
## 🖊下一步计划
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue