add drone.yaml
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
# ============================================================
|
||||
# violin-cv Dockerfile — 纯 HTML 静态站(不 build)
|
||||
# ============================================================
|
||||
# 架构:
|
||||
# 1. 基础镜像:nginx alpine(轻量)
|
||||
# 2. COPY:把 src/pages/*.html 直接复制到 nginx serve 目录
|
||||
# 3. nginx 配置:让 / 指向 index.html
|
||||
#
|
||||
# 注意:HTML 中所有 style / script 都在文件内联(或外部 fonts),
|
||||
# 所以不依赖额外的 CSS / JS 文件 —— 单文件即可 serve。
|
||||
# ============================================================
|
||||
|
||||
FROM ccr.ccs.tencentyun.com/violin/nginx
|
||||
|
||||
# 删除默认 nginx 配置
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 复制 nginx 配置
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 复制静态文件(含 HTML)
|
||||
COPY src/pages/ /usr/share/nginx/html/
|
||||
|
||||
# 暴露 HTTP 端口
|
||||
EXPOSE 80
|
||||
|
||||
# 健康检查(可选,K8s 会用)
|
||||
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
|
||||
CMD wget -q --spider http://localhost/ || exit 1
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user