teable

使用 Pigsty 托管的 PostgreSQL 部署 Teable 开源 Airtable 替代品

teable 配置模板提供了部署 Teable 开源无代码数据库的参考配置,使用 Pigsty 托管的 PostgreSQL 作为数据库。

更多细节,请参考 Teable 部署教程


配置概览

  • 配置名称: teable(位于 app/teable.yml
  • 节点数量: 单节点
  • 配置说明:使用 Pigsty 托管的 PostgreSQL 部署 Teable
  • 适用系统:el8, el9, d12, u22, u24
  • 适用架构:x86_64
  • 相关配置:meta

启用方式:

./configure -c app/teable [-i <primary_ip>]

配置内容

源文件地址:pigsty/conf/app/teable.yml

all:
  children:

    # Teable 应用
    teable:
      hosts: { 10.10.10.10: {} }
      vars:
        app: teable
        apps:
          teable:
            conf:
              POSTGRES_HOST: "10.10.10.10"
              POSTGRES_PORT: "5432"
              POSTGRES_DB: "teable"
              POSTGRES_USER: "dbuser_teable"
              POSTGRES_PASSWORD: "DBUser.Teable"
              PRISMA_DATABASE_URL: "postgresql://dbuser_teable:DBUser.Teable@10.10.10.10:5432/teable"
              PUBLIC_ORIGIN: "http://tea.pigsty"
              PUBLIC_DATABASE_PROXY: "10.10.10.10:5432"
              TIMEZONE: "UTC"

    # Teable 数据库
    pg-meta:
      hosts: { 10.10.10.10: { pg_seq: 1, pg_role: primary } }
      vars:
        pg_cluster: pg-meta
        pg_users:
          - { name: dbuser_teable ,password: DBUser.Teable ,pgbouncer: true ,roles: [ dbrole_admin ] ,superuser: true }
        pg_databases:
          - { name: teable ,owner: dbuser_teable ,comment: teable database }
        pg_hba_rules:
          - { user: teable ,db: all ,addr: 172.17.0.0/16 ,auth: pwd ,title: 'allow teable from docker' }

    infra: { hosts: { 10.10.10.10: { infra_seq: 1 } } }
    etcd:  { hosts: { 10.10.10.10: { etcd_seq: 1 } }, vars: { etcd_cluster: etcd } }
    minio: { hosts: { 10.10.10.10: { minio_seq: 1 } }, vars: { minio_cluster: minio } }

  vars:
    version: v4.0.0
    admin_ip: 10.10.10.10
    region: default
    docker_enabled: true
    infra_portal:
      home   : { domain: i.pigsty }
      teable : { domain: tea.pigsty ,endpoint: "10.10.10.10:8890" ,websocket: true ,certbot: tea.pigsty }

    repo_enabled: false
    node_repo_modules: node,infra,pgsql
    pg_version: 18

    #----------------------------------------------#
    # PASSWORD
    #----------------------------------------------#
    grafana_admin_password: pigsty
    pg_admin_password: DBUser.DBA
    # ... 更多密码配置

配置解读

teable 模板提供了 Teable 开源无代码数据库的一键部署方案。

Teable 是什么

  • 开源的 Airtable 替代品
  • 基于 PostgreSQL 的无代码数据库
  • 支持表格、看板、日历、表单等多种视图
  • 提供 API 和自动化工作流

关键特性

  • 使用 Pigsty 管理的 PostgreSQL 作为底层存储
  • 数据实际存储在真实的 PostgreSQL 表中
  • 支持 SQL 直接查询数据
  • 可与其他 PostgreSQL 工具和扩展集成

部署步骤

curl -fsSL https://repo.pigsty.io/get | bash
./configure -c app/teable
vi pigsty.yml                    # 修改密码和域名
./install.yml                    # 安装 Pigsty 和 PostgreSQL
./docker.yml                     # 安装 Docker
./app.yml                        # 启动 Teable 容器

访问方式

# Teable Web 界面
http://tea.pigsty:8890

# 或通过 Nginx 代理
https://tea.pigsty

# 同时可以直接 SQL 访问底层数据
psql postgresql://dbuser_teable:DBUser.Teable@10.10.10.10:5432/teable

适用场景

  • 需要 Airtable 类似功能但希望自建
  • 团队协作数据管理
  • 需要同时支持 API 和 SQL 访问
  • 希望数据存储在真实 PostgreSQL 中

注意事项

  • Teable 用户需要 superuser 权限
  • 需要正确配置 PUBLIC_ORIGIN 为外部访问地址
  • 支持邮件通知(可选配置 SMTP)
  • Docker 网络需要能访问 PostgreSQL

最后修改 2025-12-21: update blogs (cbce062)