Containerize: configurable HOST/PORT for Coolify

This commit is contained in:
2026-11-03 16:13:13 +01:00
parent 78146bb5ab
commit 6db0e29e1a
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -3,5 +3,7 @@ WORKDIR /app
COPY *.py ./
ENV PYTHONUNBUFFERED=1
ENV HOME=/data
ENV HOST=0.0.0.0
ENV PORT=8899
EXPOSE 8899
CMD ["python3", "server.py"]
+1 -1
View File
@@ -403,4 +403,4 @@ class H(BaseHTTPRequestHandler):
if __name__ == "__main__":
HTTPServer(("127.0.0.1", 8899), H).serve_forever()
HTTPServer((os.getenv("HOST", "127.0.0.1"), int(os.getenv("PORT", "8899"))), H).serve_forever()