diff --git a/docs/configuration/components/automation-worker.md b/docs/configuration/components/automation-worker.md new file mode 100644 index 00000000..0a1b2287 --- /dev/null +++ b/docs/configuration/components/automation-worker.md @@ -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 + + + +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 | diff --git a/docs/configuration/components/dtable-server.md b/docs/configuration/components/dtable-server.md index 0de579b0..834dcd3d 100644 --- a/docs/configuration/components/dtable-server.md +++ b/docs/configuration/components/dtable-server.md @@ -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. @@ -17,7 +17,7 @@ The default values provided here are best-effort (not built automatically). They -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 @@ -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 + + + +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 | diff --git a/docs/introduction/architecture.md b/docs/introduction/architecture.md index b67dc7f8..6e8bac68 100644 --- a/docs/introduction/architecture.md +++ b/docs/introduction/architecture.md @@ -20,9 +20,18 @@ flowchart TB B[seatable-server
80] C[mariadb
3306] D[redis
6379] + E[automation-worker] + G[dtable-server
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 @@ -30,7 +39,7 @@ flowchart TB 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. @@ -52,6 +61,8 @@ flowchart TB PSc[python-scheduler] PSt[python-starter] PR[python-runner] + AW[automation-worker] + DS[dtable-server
5000] C<-->SS C<-->Tld C<-->OO @@ -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 @@ -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. @@ -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 + + + +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 + + + +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.) diff --git a/mkdocs.yml b/mkdocs.yml index 24ed99db..c1e7d3af 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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