mirror of
https://gitee.com/NexIoT/Universal-IoT-Java.git
synced 2026-09-19 07:10:41 +08:00
19 lines
416 B
Docker
19 lines
416 B
Docker
# 使用 nginx 作为基础镜像
|
|
FROM nginx:alpine
|
|
|
|
# 复制前端构建文件
|
|
COPY dist/ /usr/share/nginx/html/
|
|
|
|
# 复制 nginx 配置
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
# 暴露端口
|
|
EXPOSE 80
|
|
|
|
# 健康检查
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
|
|
|
# 启动 nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|