feat: 删除.drone.yml && 采用build.sh手动构建镜像
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user