Files

39 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2026-01-10 23:08:56 +08:00
# 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 白名单)
2026-01-10 23:08:56 +08:00
tunnel: <YOUR_TUNNEL_NAME_OR_ID>
credentials-file: ./<YOUR_TUNNEL_ID>.json
ingress:
2026-05-20 10:43:38 +08:00
# 1) MNote Rust Webmnote-web,含 /api/*
- hostname: app.mnote.example.com
2026-01-10 23:08:56 +08:00
service: http://127.0.0.1:3000
# 2) SupabaseKong 入口,开发环境常见为 18000)
2026-05-20 10:43:38 +08:00
- hostname: supabase.mnote.example.com
2026-01-10 23:08:56 +08:00
service: http://127.0.0.1:18000
# 3) wolai-backend(如需对外暴露)
2026-05-20 10:43:38 +08:00
- hostname: backend.mnote.example.com
2026-01-10 23:08:56 +08:00
service: http://127.0.0.1:8000
# 4) MinerU(你当前 .env.local 为 18888
2026-05-20 10:43:38 +08:00
- hostname: mineru.mnote.example.com
2026-01-10 23:08:56 +08:00
service: http://127.0.0.1:18888
# 5) OnlyOffice Document Serverdocker: onlyoffice-dev 暴露到 8081
2026-05-20 10:43:38 +08:00
- hostname: onlyoffice.mnote.example.com
2026-01-11 12:35:53 +08:00
service: http://127.0.0.1:8081
2026-01-10 23:08:56 +08:00
# 未匹配的请求直接 404
- service: http_status:404