- pnpm 11 默认拒绝发布不足 1 天的依赖(供应链策略),锁文件里 tailwind v4 的 @csstools 传递依赖会踩中,导致镜像构建失败且 pnpm build 的 run 前自检(隐式 install)还会再次踩中。pnpm 11 该配置只认 pnpm-workspace.yaml(.npmrc/ENV 均不生效),在 web-builder 阶段写入 minimumReleaseAge: 0;frozen-lockfile + --ignore-scripts 两道闸仍在,放开无风险 - config.validate 的生产 fail-fast 要求 refresh cookie 必须 Secure, compose 漏配 OT_JWT_COOKIE_SECURE 导致新镜像启动即被拒绝
43 lines
1.5 KiB
YAML
43 lines
1.5 KiB
YAML
# openteam 自托管部署
|
||
#
|
||
# 启动:docker compose up -d
|
||
# 首次会本地构建镜像(见 Dockerfile);若已用 build-image.sh 推到仓库,
|
||
# 把 image 改为仓库地址并删掉 build 段即可拉取多架构镜像。
|
||
#
|
||
# 密钥从仓库根 .env 读取(与本地开发共用),缺失时 compose 直接报错。
|
||
name: openteam
|
||
|
||
services:
|
||
openteam:
|
||
build:
|
||
context: .
|
||
dockerfile: Dockerfile
|
||
image: openteam:latest
|
||
container_name: openteam
|
||
restart: unless-stopped
|
||
ports:
|
||
- "${HOST_PORT:-8080}:8080"
|
||
environment:
|
||
OT_ENV: production
|
||
OT_PORT: 8080
|
||
# sqlite 落盘到当前目录 ./data(容器 WORKDIR=/app,DSN 用相对路径)
|
||
OT_DB_DRIVER: sqlite
|
||
OT_DB_DSN: data/openteam.db
|
||
# 必填密钥:渠道加密主密钥 / 管理员密码 / JWT 签名
|
||
OT_MASTER_KEY: ${OT_MASTER_KEY:?请在 .env 中设置 OT_MASTER_KEY}
|
||
OT_ADMIN_PASSWORD: ${OT_ADMIN_PASSWORD:?请在 .env 中设置 OT_ADMIN_PASSWORD}
|
||
OT_JWT_SECRET: ${OT_JWT_SECRET:?请在 .env 中设置 OT_JWT_SECRET}
|
||
# 生产 fail-fast 要求:refresh cookie 必须标记 Secure(服务在 TLS 反代后暴露)
|
||
OT_JWT_COOKIE_SECURE: "true"
|
||
# 入口脚本据此 chown 数据目录并降权运行(默认 1000:1000)
|
||
OT_UID: "${OT_UID:-1000}"
|
||
OT_GID: "${OT_GID:-1000}"
|
||
volumes:
|
||
- ./data:/app/data
|
||
healthcheck:
|
||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/healthz"]
|
||
interval: 30s
|
||
timeout: 5s
|
||
retries: 3
|
||
start_period: 10s
|