fix: 单实例锁、应用日志和容器健康检查

This commit is contained in:
2026-11-16 09:32:33 +08:00
parent 990b80c017
commit 9c4f319908
10 changed files with 115 additions and 6 deletions
+6 -1
View File
@@ -16,5 +16,10 @@ COPY backend/alembic.ini .
COPY --from=web /src/web/dist /web/dist
ENV EUNIV_DB_PATH=/data/euniv.db
ENV EUNIV_COOKIE_SECURE=1
ENV PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["uvicorn", "euniv.api:app", "--host", "0.0.0.0", "--port", "8000"]
RUN useradd --system --uid 10001 --home /app euniv \
&& mkdir -p /data \
&& chown -R euniv:euniv /app /data
USER euniv
CMD ["uvicorn", "euniv.api:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1", "--ws", "wsproto", "--forwarded-allow-ips", "*"]