39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
# Cloudflare Tunnel 示例配置(路径 A:前端与 API 同源回源到本机)
|
||
#
|
||
# 用法(示意):
|
||
# 1) 在 Cloudflare 创建 tunnel 并下载 credentials.json
|
||
# 2) 把 credentials.json 放到与本文件同目录(或修改下面 credentials-file)
|
||
# 3) cloudflared tunnel --config .\config.yml run
|
||
#
|
||
# 注意:
|
||
# - hostname 需要先在 Cloudflare DNS 里绑定到该 tunnel
|
||
# - 本示例把 app/supabase/mineru 分别用子域名暴露
|
||
# - 生产环境建议对 mineru 增加额外保护(Cloudflare Access / IP 白名单)
|
||
|
||
tunnel: <YOUR_TUNNEL_NAME_OR_ID>
|
||
credentials-file: ./<YOUR_TUNNEL_ID>.json
|
||
|
||
ingress:
|
||
# 1) MNote Rust Web(mnote-web,含 /api/*)
|
||
- hostname: app.mnote.example.com
|
||
service: http://127.0.0.1:3000
|
||
|
||
# 2) Supabase(Kong 入口,开发环境常见为 18000)
|
||
- hostname: supabase.mnote.example.com
|
||
service: http://127.0.0.1:18000
|
||
|
||
# 3) wolai-backend(如需对外暴露)
|
||
- hostname: backend.mnote.example.com
|
||
service: http://127.0.0.1:8000
|
||
|
||
# 4) MinerU(你当前 .env.local 为 18888)
|
||
- hostname: mineru.mnote.example.com
|
||
service: http://127.0.0.1:18888
|
||
|
||
# 5) OnlyOffice Document Server(docker: onlyoffice-dev 暴露到 8081)
|
||
- hostname: onlyoffice.mnote.example.com
|
||
service: http://127.0.0.1:8081
|
||
|
||
# 未匹配的请求直接 404
|
||
- service: http_status:404
|