feat(frontend): 新增首页新闻区块显示开关功能
- 首页新增 showNewsSection 字段,支持通过全局配置隐藏或显示新闻区块 - 主页组件根据 showNewsSection 判断是否渲染新闻区块组件 - 数据库添加 show_news_section 字段,默认值为 true - 新增对应数据库迁移脚本以支持字段的添加和删除 - 更新 Payload 配置,新增“显示首页新闻区块”复选框,带默认选中说明 - 添加部署脚本 rsync-deploy.sh,支持项目文件的增量同步与便捷发布 - 优化 Dockerfile,调整用户组参数,新增 public 目录确保部署环境完整
This commit is contained in:
+3
-4
@@ -1,5 +1,3 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM uhub.service.ucloud.cn/mysql-images/node:22-bookworm-slim AS deps
|
||||
WORKDIR /app
|
||||
|
||||
@@ -13,6 +11,7 @@ WORKDIR /app
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN mkdir -p public
|
||||
|
||||
ARG NEXT_PUBLIC_SITE_URL
|
||||
ARG PAYLOAD_SECRET
|
||||
@@ -35,7 +34,7 @@ ENV HOSTNAME=0.0.0.0
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
RUN addgroup --system --gid 1001 nodejs \
|
||||
&& adduser --system --uid 1001 --gid nodejs nextjs
|
||||
&& adduser --system --uid 1001 --ingroup nodejs nextjs
|
||||
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
@@ -48,4 +47,4 @@ USER nextjs
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user