Update docker workings
Some checks failed
Build and Publish ipserv / build_and_publish (push) Failing after 40s

This commit is contained in:
Nexus 2024-04-28 00:09:49 +01:00
parent bc13c0dcc2
commit 6b29f7d868
Signed by: nex
GPG key ID: 0FA334385D0B689F
3 changed files with 16 additions and 6 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.idea/
.vscode/
.venv/
venv/

View file

@ -1,8 +1,9 @@
FROM python:3-slim
WORKDIR /app
COPY ipserv.py /app
COPY cert/ /app/cert
FROM python:3.12-slim
EXPOSE 80/tcp
RUN pip install fastapi requests gunicorn uvicorn[standard] aiohttp
WORKDIR /app
COPY requirements.txt /tmp
RUN pip install -r /tmp/requirements.txt
COPY cert/ /app/cert
COPY ipserv.py /app
CMD ["gunicorn", "-b", "0.0.0.0:80", "--forwarded-allow-ips", "*", "--worker-class", "uvicorn.workers.UvicornWorker", "ipserv:app"]

5
requirements.txt Normal file
View file

@ -0,0 +1,5 @@
fastapi~=0.110
requests~=2.31
gunicorn~=22.0.0
uvicorn[standard]~=0.29
aiohttp~=3.9