Add Dockerfile, compose file and Gitea Actions workflow
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8341c25846
commit
b0480c8e56
5 files changed
+104
-12
No files matched your search
+12
@@ -0,0 +1,12 @@
|
||||
FROM python:3.13-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 DATA_DIR=/data PORT=8080
|
||||
RUN useradd --system --uid 10001 --home /app app && mkdir /data && chown app /data
|
||||
WORKDIR /app
|
||||
COPY server.py index.html ./
|
||||
USER app
|
||||
VOLUME /data
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD python -c "import urllib.request,os;urllib.request.urlopen('http://127.0.0.1:%s/login'%os.environ['PORT'])" || exit 1
|
||||
CMD ["python", "server.py", "serve"]
|
||||
Reference in new issue
Block a user