Sign inSign up

randallxia/feishu-webhook-booking

By randallxia

•Updated 8 days ago

一个面向 iPhone Shortcuts + 飞书多维表格的轻量 FastAPI webhook 桥接器。

Image
Networking
Developer tools
0

1.2K

randallxia/feishu-webhook-booking repository overview

⁠Feishu-Webhook-Booking

一个面向 iPhone Shortcuts⁠ + 飞书多维表格⁠的轻量 FastAPI webhook 桥接器。

⁠快速使用

⁠docker run
docker run -d \
  --name feishu-webhook-booking \
  --restart unless-stopped \
  -p 2398:2398 \
  -e FEISHU_ENV_FILE=/runtime/feishu-webhook.env \
  -e FEISHU_TARGETS_FILE=/runtime/feishu-targets.toml \
  -v ./runtime:/runtime:ro \
  randallxia/feishu-webhook-booking:latest
⁠docker-compose.yml
services:
  feishu-webhook-booking:
    image: randallxia/feishu-webhook-booking:latest
    container_name: feishu-webhook-booking
    restart: unless-stopped
    ports:
      - "2398:2398"
    environment:
      FEISHU_ENV_FILE: /runtime/feishu-webhook.env
      FEISHU_TARGETS_FILE: /runtime/feishu-targets.toml
    volumes:
      - ./runtime:/runtime:ro
⁠它负责
  • 接收 OCR 原始文本
  • 校验共享 Token
  • 根据 book_alias / year 选择目标账本
  • 更新飞书记录中的 原始信息
  • 交给飞书自动化继续生成后续字段
⁠运行方式

将这里⁠的两份 example 配置文件下载到你的挂载 runtime 目录下

建议通过环境变量或 FEISHU_ENV_FILE 做运行时配置。,密钥不进镜像。

年度账本切换时,只改外部配置并重启服务,不需要重新构建镜像。

必需:

  • WEBHOOK_SHARED_TOKEN
  • FEISHU_APP_ID
  • FEISHU_APP_SECRET

可选:

  • FEISHU_TARGETS_FILE
  • FEISHU_TARGET_RELOAD_INTERVAL_SECONDS
  • CONFIG_RELOAD_TOKEN

兼容旧模式:

  • FEISHU_APP_TOKEN
  • FEISHU_TABLE_ID
  • FEISHU_RECORD_ID
⁠重要启动提醒

如果你挂载了/runtime/feishu-webhook.env,但没有在容器环境变量里显式设置:

FEISHU_ENV_FILE=/runtime/feishu-webhook.env

那么容器启动时不会读取这个文件。

这时服务可能会退回旧兼容模式,并报错:

Missing required environment variable: FEISHU_APP_TOKEN

Tag summary

Content type

Image

Digest

sha256:bcedcc0f2…

Size

35.1 MB

Last updated

8 days ago

docker pull randallxia/feishu-webhook-booking