feat(deploy): add Dockerfile and compose for server sync
This commit is contained in:
1 parent
7674fc2c47
commit
b9d82e54c7
4 files changed
+159
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
# 咻咻满 Reaction 看板 —— 单体服务镜像
|
||||
#
|
||||
# 运行:只读 Web + 调度 + Telegram(与 `python app.py` 等价)。
|
||||
# 配置挂载到 /config,数据挂载到 /data。
|
||||
|
||||
FROM python:3.14-slim
|
||||
|
||||
ENV TZ=Asia/Shanghai \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends tzdata ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 依赖锁定在 uv.lock 的 httpx 0.28.1;如需新增依赖请同步 pyproject.toml / uv.lock。
|
||||
RUN pip install --no-cache-dir "httpx==0.28.1"
|
||||
|
||||
COPY app.py favsort.py ./
|
||||
COPY reaction_board ./reaction_board
|
||||
COPY vendor ./vendor
|
||||
|
||||
VOLUME ["/config", "/data"]
|
||||
EXPOSE 8080
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
|
||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/api/health', timeout=3)"
|
||||
|
||||
CMD ["python", "app.py", "--config", "/config/config.json"]
|
||||
Reference in new issue
Block a user