Deployment and Configuration
Except for the frontend, the Gateway and every engine are deployed as containers, on the same machine, on the LAN or remotely. The frontend is not containerised; each platform packages it with its own native toolchain.
Gateway configuration
Section titled “Gateway configuration”The Gateway reads a TOML file. An example is deploy/gateway.example.toml in the project repository:
pinshuo-gateway --config deploy/gateway.example.toml[gateway] listen: the address the frontend connects to, written asunix:/absolute/pathortcp:127.0.0.1:port. TCP accepts loopback addresses only.[[backend]]: one entry per engine.idis unique within the file, andaddressis written asunix:/absolute/pathortcp:host:port(use the service name between containers).- The tuning entries are in milliseconds, range 1 to 3600000:
request_timeout_ms(default 500),connect_timeout_ms(1000),health_interval_ms(1000),retry_initial_ms(200),retry_max_ms(5000).
A missing required entry, a malformed address, an out-of-range value, a duplicate engine id, no engine at all, or an unknown field is reported as a clear error. Nothing silently falls back to a default.
Exit codes: 0 normal exit; 1 start failure (for example two engines declare the same capability); 2 invalid command line or configuration, nothing started.
Engine containers
Section titled “Engine containers”One directory per engine and one container per directory, each with its own Containerfile. The Doubao engine is one container that declares both pinyin and voice, so it is registered once in the Gateway configuration. Both of its capabilities share one Wine-hosted Doubao engine, so pinyin and voice cannot run at the same time.
For testing: the fake engine and the Doubao engine both declare pinyin and voice, and registering both makes the start fail with a conflict. Keep only one.