moodist/Dockerfile.simple
zl a8718df8d2 feat: add comprehensive Docker deployment support and Chinese documentation
- Add Docker deployment configuration with multiple Dockerfile variants
- Implement simplified Docker build scripts for better compatibility
- Update docker-compose configurations to use walllee/moodist image
- Create comprehensive Docker deployment documentation
- Add Chinese README (README.zh-CN.md) with full translation
- Implement language selection links in both README files
- Add quick start guide and Docker deployment instructions in Chinese
- Include Docker build and push commands in package.json scripts

New files added:
- Docker configurations (Dockerfile.* variants)
- Docker Compose files (dev, optimized versions)
- Build scripts (scripts/*.sh)
- Docker deployment documentation (DOCKER_DEPLOY.md)
- Chinese README with complete translation
2025-11-16 15:35:01 +08:00

44 lines
No EOL
1.3 KiB
Text

# 简化的Dockerfile - 使用本地构建产物
FROM nginx:alpine
# 安装curl用于健康检查
RUN apk add --no-cache curl
# 复制自定义nginx配置
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
# 复制本地构建的静态文件
COPY dist/ /usr/share/nginx/html
# 设置正确的权限
RUN chown -R nginx:nginx /usr/share/nginx/html && \
chown -R nginx:nginx /var/cache/nginx && \
chown -R nginx:nginx /var/log/nginx && \
chown -R nginx:nginx /etc/nginx/conf.d
# 创建nginx运行时需要的目录
RUN touch /var/run/nginx.pid && \
chown -R nginx:nginx /var/run/nginx.pid
# 切换到非root用户
USER nginx
# 暴露端口
EXPOSE 8080
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/ || exit 1
# 启动nginx
CMD ["nginx", "-g", "daemon off;"]
# 添加标签信息
LABEL maintainer="walllee" \
org.opencontainers.image.title="Moodist" \
org.opencontainers.image.description="Ambient sounds for focus and calm - 多语言环境音应用" \
org.opencontainers.image.version="2.1.0" \
org.opencontainers.image.created="2025-11-16T06:53:40Z" \
org.opencontainers.image.revision="65958f8" \
org.opencontainers.image.source="https://github.com/wheesys/moodist" \
org.opencontainers.image.licenses="MIT"