refactor: workspace secrets-core + secrets-mcp MCP SaaS
- Split library (db/crypto/service) and MCP/Web/OAuth binary - Add deploy examples and CI/docs updates Made-with: Cursor
This commit is contained in:
27
deploy/.env.example
Normal file
27
deploy/.env.example
Normal file
@@ -0,0 +1,27 @@
|
||||
# Secrets MCP Server 环境变量配置
|
||||
# 复制此文件为 .env 并填写真实值
|
||||
|
||||
# ─── 数据库 ───────────────────────────────────────────────────────────
|
||||
SECRETS_DATABASE_URL=postgres://postgres:PASSWORD@HOST:PORT/secrets-mcp
|
||||
|
||||
# ─── 服务地址 ─────────────────────────────────────────────────────────
|
||||
# 内网监听地址(Cloudflare / Nginx 反代时填内网端口)
|
||||
SECRETS_MCP_BIND=127.0.0.1:9315
|
||||
|
||||
# 对外 HTTPS 地址(用于 OAuth 回调 URL 拼接)
|
||||
BASE_URL=https://secrets.example.com
|
||||
|
||||
# ─── Google OAuth ─────────────────────────────────────────────────────
|
||||
# Google Cloud Console → APIs & Services → Credentials
|
||||
# 授权回调 URI 须配置为:${BASE_URL}/auth/google/callback
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
# ─── 微信登录(暂未开放,预留)───────────────────────────────────────
|
||||
# WECHAT_APP_CLIENT_ID=
|
||||
# WECHAT_APP_CLIENT_SECRET=
|
||||
|
||||
# ─── 注意 ─────────────────────────────────────────────────────────────
|
||||
# SERVER_MASTER_KEY 已不再需要。
|
||||
# 新架构(E2EE)中,加密密钥由用户密码短语在客户端本地派生,服务端不持有原始密钥。
|
||||
# 仅在需要迁移旧版 wrapped_key 数据时临时启用。
|
||||
27
deploy/secrets-mcp.service
Normal file
27
deploy/secrets-mcp.service
Normal file
@@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=Secrets MCP Server
|
||||
After=network.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=secrets-mcp
|
||||
Group=secrets-mcp
|
||||
WorkingDirectory=/opt/secrets-mcp
|
||||
EnvironmentFile=/opt/secrets-mcp/.env
|
||||
ExecStart=/opt/secrets-mcp/secrets-mcp
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=secrets-mcp
|
||||
|
||||
# 安全加固
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ReadWritePaths=/opt/secrets-mcp
|
||||
PrivateTmp=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user