Files
arcticnewone/deploy/deployment.yaml
T
virtheart 5c3f3bca63 feat: 全量落地后端与功能闭环
- 真实后端(server/):SQLite 存储 + scrypt 会话鉴权 + SMTP 邮件
  - auth 注册/登录/登出/me/资料更新
  - contact 联系表单(落库+邮件)、newsletter 订阅(去重)
  - favorites 作品收藏、comments 新闻评论、account 管理收件箱
- 用户系统 UI:个人中心 /account(资料/收藏/评论/管理员面板)、
  收藏按钮、评论组件、登录/注册弹窗接真实 API(useApiError 错误映射)
- 内容单点事实源:app/data/news|work 消除三处重复,页面全部引用
- 修复断链:首页动态/作品卡可点击、分享按钮真实动作、移除 # 死链、
  语言切换器、社交链接统一 siteConfig
- SEO:动态 sitemap/robots、JSON-LD、脚本生成真实 og-image.png
- 列表增强:搜索 + 加载更多
- 部署自动化:build-and-push.sh 支持 git tag 版本化镜像;
  deploy.sh 一条命令构建推送+注入 Secret/ConfigMap+kubectl 滚动升级;
  deployment 挂 PVC 持久化;Dockerfile 支持 better-sqlite3 原生编译
- 组件注册去目录前缀,修复 AppLoader/AnimatedButton 等未渲染问题
2026-08-06 15:08:34 +08:00

83 lines
2.3 KiB
YAML
Raw Permalink 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.
# =========================================================
# Arcticnewone 生产部署 - Deployment
#
# 镜像: 由 deploy.sh 渲染,占位 __IMAGE__ 替换为
# swr.cn-north-4.myhuaweicloud.com/virtheart/arcticnewone:<版本号>
# 副本数: 1(团队规范)
#
# 敏感配置(SESSION_SECRET / SMTP_* / CONTACT_TO / ADMIN_EMAILS)
# 由 deploy.sh 以 Secret `app-secrets` 注入;公开配置(站点地址/DB 路径)
# 以 ConfigMap `app-config` 注入。数据库持久化到 PVC `arcticnewone-data`(/data)。
# =========================================================
apiVersion: apps/v1
kind: Deployment
metadata:
name: arcticnewone
namespace: arcticnewone
labels:
app: arcticnewone
spec:
# RWO PVC 单副本场景:Recreate 策略避免滚动更新时新旧 Pod 争用卷导致死锁
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: arcticnewone
template:
metadata:
labels:
app: arcticnewone
spec:
imagePullSecrets:
- name: huawei-swr-secret
containers:
- name: arcticnewone
image: __IMAGE__
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
env:
- name: NODE_ENV
value: "production"
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "3000"
envFrom:
- configMapRef:
name: app-config
- secretRef:
name: app-secrets
volumeMounts:
- name: data
mountPath: /data
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 15
periodSeconds: 20
timeoutSeconds: 3
failureThreshold: 3
volumes:
- name: data
persistentVolumeClaim:
claimName: arcticnewone-data