3.4 KiB
name, description
| name | description |
|---|---|
| optional-server-services | Keep installer-managed RustFS and coturn Compose services aligned with the server installer's paths and networking. |
Installer-managed optional services
The Linux and Windows server installers run optional Compose files with the installation root as the current directory. They save service secrets in optional/secrets/ and pass the root .env for interpolation. Therefore, Compose secret file: entries must use ./optional/secrets/<name>, not ./secrets/<name> or paths relative to optional/.
RustFS
- Keep
rustfs_access_keyandrustfs_secret_keyfile paths aligned with the generated files from both installers. - Installers create these bind-mounted secret files as owner-only (
0600), which the official RustFS process (10001:10001) cannot read directly. Keep a short root initializer, copy the files into the service's private tmpfs,chownthe copies to UID/GID 10001, then drop to therustfsaccount before executing the upstream entrypoint. Keep the root filesystem read-only and provide tmpfs only for runtime paths that RustFS writes (/logs,/tmp, and its secret copies). - Verify Compose config from the install-root working directory and ensure Docker secrets are sourced from those files.
- Keep the named data volume and shared
heimdall-netbehavior intact.
coturn
- Keep
coturn_secretsourced from./optional/secrets/coturn_secret. - coturn 4.6 does not support
--static-auth-secret-file; read the mounted Docker secret in a short root initializer and write its configuration into private tmpfs. Do not print the value or pass it in the server process arguments. - Local Compose secrets are owner-only bind mounts too. Start the initializer as root, make the temporary config readable by the image's
nobodyaccount, thenexecturnserverasnobodywithno-new-privilegesenabled. Keep the root init transient; do not run the TURN daemon as root. - Use a shell entrypoint that executes
turnserver, bridge networking, and explicit TCP/UDP listener and UDP relay port publications; the upstream image has aturnadminentrypoint, and host networking cannot be combined with useful Compose port mappings. - Keep the published relay range identical to coturn's
--min-port/--max-portoptions. Make listener and relay settings configurable with documented defaults. - Keep
COTURN_EXTERNAL_IPoptional; when set in the installer root.env, add Coturn'sexternal-ipdirective so it advertises the public address across NAT. The operator must forward the listener and relay range through firewalls/NAT. Do not set a guessed public address. - Do not claim public TURN reachability from a local container startup. It requires an external ICE/TURN client on a real network.
Acceptance
Run skills/optional-server-services/acceptance.sh. It creates a uniquely named disposable Compose project, generated owner-only secrets, an isolated install root, unique listener and relay ports, then validates Compose using that root. It verifies RustFS /health, signs a real S3 bucket-creation request with the generated keys, and runs turnutils_uclient inside the Compose network with TURN REST credentials. This proves local container-network allocation only; it does not prove external firewall/NAT reachability. The trap tears down only that project and verifies its containers, volumes, and networks are absent. The recipe builds no local images and retains upstream images.