Skip to content
Draft

v7.0 #354

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions docs/configuration/components/automation-worker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
description: Complete reference for automation-worker configuration including workers and PDF generation settings.
---

# Configuration of automation-worker

This is a cheat sheet for the possible configuration options of the [automation-worker](../../introduction/architecture.md#container-automation-worker).
It contains all possible settings that can be configured as well as their default values.

The automation-worker is a dedicated component that executes automation rules.
It reads pending automation tasks from Redis, runs the configured actions (e.g. sending emails, running Python scripts, generating PDFs or triggering AI-powered automations), and publishes the results back to Redis.

The default values provided here are best-effort (not built automatically). They will be used if no value is defined at all.

??? tip "Configuration changes require a restart"

New configuration options will only apply after a restart of the automation-worker.

## Environment Variables

<!-- md:version 7.0 -->

This section lists the environment variables read by the automation-worker.
Please read our guide that explains how you can [customize the configuration](../customizations.md) of your SeaTable instance before you proceed.

### Workers

| Environment Variable | Description | Default |
| -------------------- | ---------------------------------------------------------------------- | ------- |
| `AUTOMATION_WORKERS` | Number of worker threads that process automation rule tasks from Redis | 5 |

### PDF Generation

| Environment Variable | Description | Default |
| ---------------------------------- | -------------------------------------------------------- | ------- |
| `CONVERT_PDF_BROWSERS` | Number of browser processes started to generate PDF files | 2 |
| `CONVERT_PDF_SESSIONS_PER_BROWSER` | Number of sessions per browser instance | 3 |
15 changes: 13 additions & 2 deletions docs/configuration/components/dtable-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Complete reference for dtable-server configuration including row li

# Configuration of dtable-server

This is a cheat sheet for the possible configuration options of [dtable-server](../../introduction/architecture.md#dtable-server).
This is a cheat sheet for the possible configuration options of [dtable-server](../../introduction/architecture.md#container-dtable-server).
It contains all possible settings that can be configured as well as their default values.

The default values provided here are best-effort (not built automatically). They will be used if no value is defined at all.
Expand All @@ -17,7 +17,7 @@ The default values provided here are best-effort (not built automatically). They

<!-- md:version 6.2 -->

This section lists the environment variables read by [dtable-server](../../introduction/architecture.md#dtable-server).
This section lists the environment variables read by [dtable-server](../../introduction/architecture.md#container-dtable-server).
Please read our guide that explains how you can [customize the configuration](../customizations.md) of your SeaTable instance before you proceed.

### Automations
Expand All @@ -26,6 +26,17 @@ Please read our guide that explains how you can [customize the configuration](..
| --------------------------------------- | -------------------------------------------------------------------------- | ------- |
| `AUTOMATION_RATE_LIMIT_PER_BASE_MINUTE` | Limits the number of automations that can be triggered per base per minute | 1000 |

### Caching

<!-- md:version 7.0 -->

The Golang implementation of `dtable-server` supports configuration of the base cache size.
Eviction happens based on an LRU (least recently used) policy.

| Environment Variable | Description | Default |
| -------------------------------- | ----------------------------- | ------- |
| `DTABLE_SERVER_TOTAL_CACHE_SIZE` | Size of the base cache in MB. | 2000 |

### Persistence

| Environment Variable | Description | Default |
Expand Down
40 changes: 35 additions & 5 deletions docs/introduction/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,26 @@ flowchart TB
B[seatable-server<br/>80]
C[mariadb<br/>3306]
D[redis<br/>6379]
E[automation-worker]
G[dtable-server<br/>5000]
A<-->B
B<-->C
B<-->D
B<-->E
B<-->G
E<-->C
E<-->D
E<-->G
G<-->C
G<-->D
end
F@{ shape: bow-rect, label: "Storage"}
end
```

The numbers designate the ports used by the containers. Port 443 in the container `caddy` must be exposed. Port 80 must also be exposed when a Let's Encrypt SSL certificate is to be used. All other ports are internal ports that are only available within the Docker network.

All Docker containers read from and write to local disk. The containers `caddy`, `seatable-server`, and `mariadb` employ Docker volumes.
All Docker containers read from and write to local disk. The containers `caddy`, `seatable-server`, `dtable-server`, `automation-worker` and `mariadb` employ Docker volumes.

In an extended setup, additional, optional Docker container can be deployed to add functionality to SeaTable Server. The diagram below describes all Docker containers and their interactions required for a SeaTable Server instance integrated with office editor, Python pipeline, virus scan, and whiteboard.

Expand All @@ -52,6 +61,8 @@ flowchart TB
PSc[python-scheduler]
PSt[python-starter]
PR[python-runner]
AW[automation-worker]
DS[dtable-server<br/>5000]
C<-->SS
C<-->Tld
C<-->OO
Expand All @@ -67,6 +78,13 @@ flowchart TB
SS<-->Tld
SS<-->CAV
SS<-->PSc
SS<-->AW
SS<-->DS
AW<-->MDB
AW<-->R
AW<-->DS
DS<-->MDB
DS<-->R
end
F@{ shape: bow-rect, label: "Storage"}
end
Expand Down Expand Up @@ -126,10 +144,6 @@ All services in the container `seatable-server` connect to the containers `maria

The task of the service dtable-web is to deliver all pages except for the bases themselves. This includes essential features such as the login page, home page, system administration area, team administration, personal settings, and API endpoints. All these functionalities are provided by dtable-web, which is built on the Django framework.

### dtable-server

When accessing a base, you'll be directed to the base editor, which is provided by the dtable-server service. This editor loads the base's content from a JSON file, presenting it in a familiar spreadsheet interface and enabling real-time collaborative work on all data within the base. Each modification is promptly saved to the operation log (stored in MariaDB), and within minutes, these changes are persisted as a JSON file and transmitted to dtable-storage-server for storage in the attached storage system.

### dtable-db

dtable-db extends the functionality of dtable-server, offering an SQL-like query language to interact with base data. Additionally, it serves as the interface for accessing the Big Data Backend.
Expand All @@ -150,6 +164,22 @@ When actions are not executed immediately but with a time delay, SeaTable employ

The api-gateway is a proxy for dtable-server and dtable-db. All API calls for [base operations](https://api.seatable.com/reference/getbaseinfo) are routed through this component. It is also essential for the effective enforcement of API rate and request limits.

## Container dtable-server

<!-- md:version 7.0 -->

When accessing a base, you'll be directed to the base editor, which is provided by the dtable-server service. This editor loads the base's content from a JSON file, presenting it in a familiar spreadsheet interface and enabling real-time collaborative work on all data within the base. Each modification is promptly saved to the operation log (stored in MariaDB), and within minutes, these changes are persisted as a JSON file and transmitted to dtable-storage-server for storage in the attached storage system.

**Note:** Previously, `dtable-server` ran inside the `seatable-server` container. With version 7.0, it has been extracted to a dedicated container.

## Container automation-worker

<!-- md:version 7.0 -->

The `automation-worker` container is a dedicated component that executes automation rules. It reads pending automation tasks from Redis, runs the configured actions (e.g. sending emails, running Python scripts, generating PDFs or triggering AI-powered automations), and publishes the results back to Redis.

The automation-worker connects to the containers `mariadb` and `redis` to read (and write). In addition, it accesses the inner services of the `seatable-server` container (such as dtable-server, dtable-db and dtable-web) when an automation action interacts with a base.

## Container mariadb

SeaTable uses MariaDB to store user, group and team information as well as metadata for bases. Additionally, MariaDB stores the operation log. The operation log (saved in the database table `dtable_db.operation_log`) is the base journal. It records all modifications made within all bases of the SeaTable Server instance. (While SeaTable stores all base modifications in MariaDB, it doesn't store the actual base content. Instead, bases are managed within dtable-server and regularly persisted to dtable-storage-server for long-term storage.)
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ nav:
- Overview: configuration/overview.md
- Customizations: configuration/customizations.md
- Components:
- automation-worker: configuration/components/automation-worker.md
- dtable-api-gateway: configuration/components/dtable-api-gateway.md
- dtable-db: configuration/components/dtable-db.md
- dtable-events: configuration/components/dtable-events.md
Expand Down
Loading