Files
yu-zhi-ran/platform/backend/static/Dockerfile
T
lt e1ba31afda 版本1.0.4 - 发布前准备
- 修复system.py缩进错误
- 优化前端页面样式(待重构)
- 改进API接口结构
- 完善文档和自动化脚本
- 平台基本功能稳定运行
2026-04-29 09:32:43 +08:00

37 lines
982 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 宇之然内容创作平台 - 前端Docker镜像
FROM nginx:alpine as builder
# 安装构建工具(用于优化HTML
RUN apk add --no-cache python3 py3-pip
COPY index.html /tmp/index.html
COPY login.html /tmp/login.html
# 简单压缩HTML(实际生产应使用Webpack等构建工具)
RUN cat /tmp/index.html | tr -d '\n' > /tmp/index.min.html && \
mv /tmp/index.min.html /tmp/index.html
WORKDIR /usr/share/nginx/html
# 复制静态资源
COPY . .
# 生产阶段 - 直接使用Nginx
FROM nginx:alpine
# 复制优化后的前端文件
COPY --from=builder /usr/share/nginx/html /usr/share/nginx/html
# 配置Nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 健康检查
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget --quiet --tries=1 --spider http://localhost/ || exit 1
EXPOSE 8000
# 标签信息
LABEL maintainer="宇之然团队"
LABEL version="1.0.0"
LABEL description="企业级内容创作管理系统前端"