feat: 删除.drone.yml && 采用build.sh手动构建镜像

This commit is contained in:
2025-12-17 12:27:20 +08:00
parent b7726e5aa0
commit a1552008de
6 changed files with 110 additions and 133 deletions

View File

@@ -16,17 +16,15 @@ ENV TZ=Asia/Shanghai \
WORKDIR /app
RUN pip install flask
# COPY requirements.txt .
# RUN pip install --no-cache-dir -r requirements.txt
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
EXPOSE 80
# 添加健康检查v2.0+ 特性)
# 注意v1.0 版本没有 /health 端点,不应添加健康检查
# HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
# CMD wget --no-verbose --tries=1 --spider http://localhost/health || exit 1
HEALTHCHECK --interval=10s --timeout=3s --start-period=30s --retries=3 \
CMD wget -q --spider http://127.0.0.1:80/health 2>&1 || exit 1
CMD ["python", "app.py"]