accounts/docs/usage/deployment.md
2026-01-26 22:21:11 +08:00

36 lines
772 B
Markdown
Raw 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.

# 部署方式
## 本地或 VM
推荐通过 Makefile 与脚本执行:
```bash
make init-db
make build
make start
```
默认启动脚本 `scripts/start.sh` 使用 `config/account.yaml`
## Docker
详见 `getting-started/installation.md`
## Cloud Run
仓库内的 Cloud Run 配置:
- `deploy/gcp/cloud-run/service.yaml`
- `config/account.cloudrun.yaml`
特点:
- 通过 `entrypoint.sh` + `CONFIG_TEMPLATE` 注入配置
- 附带 stunnel sidecar用于安全连接数据库
- SMTP 凭据通过 Secret 注入
## stunnel数据库连接
- 模板:`deploy/stunnel-account-db-client.conf` / `deploy/stunnel-account-db-server.conf`
- Cloud Run 示例:`deploy/gcp/cloud-run/stunnel.conf`
适合在数据库仅允许本地或专线访问的场景。