chore: default spanner mysql config#2383
Open
taddes wants to merge 6 commits into
Open
Conversation
1a81651 to
48461df
Compare
093b5d3 to
3abc6aa
Compare
…anner Provide ready-to-edit, fully-annotated example configs for the two standard builds. local.example.toml is now a documented MySQL defaut local.example.spanner.toml is a new template for the production Spanner syncstorage + MySQL tokenserver. Each setting notes its purpose, default, and backend relevance, and the REQUIRED values a user must edit are called out explicitly. Closes STOR-477
Add doc comments to the previously-undocumented public Settings fields (host/port, statsd host/port, human_logs, pool size, quota toggles, spanner_emulator_host, enabled, statsd_label) so the structs are the source of truth for configuration defaults. Documentation only; no behavior change. Closes STOR-477
Add a short How-To page describing the out-of-the-box configuration for the standard MySQL and Spanner builds, the minimum required settings, and where the full reference lives. Add a one-shot MySQL docker compose recipe (DB + server, migrations applied automatically, sync-1.5 service + node bootstrapped) so the stack comes up ready to serve. The primary recipe builds the image from source (works from a checkout with no published tag); an alternative uses a published image, noting that images are tagged by commit SHA with no `latest` tag, so SYNCSERVER_VERSION must be pinned. Register the new page in the book summary and How-To index. Closes STOR-477
A merge left a stale settings block in the MySQL example config that re-declared syncstorage.enabled/database_url/enable_quota and limits.max_total_records, producing duplicate TOML keys and a parse failure (`Cannot overwrite a value`). Remove the stale block, keeping the single annotated definitions so the template parses and can be copied to local.toml. Closes STOR-477
Use 9984 as the example syncstorage.limits.max_total_records value. Closes STOR-477
The one-shot install recipes previously existed only as copy-paste YAML in the docs, so the out-of-box install required pasting YAML into a file before running docker compose. Promote them to committed, build-from-source compose files for MySQL, PostgreSQL, and the Spanner emulator, each with a make target (docker_oneshot_<backend> / _stop), so a working server comes up in a single command with no manual database setup. Consolidate the docs to reference the committed files instead of duplicating the YAML, keeping the compose files as the single source of truth. Closes STOR-477
pjenvey
requested changes
Jun 23, 2026
| - "8000:8000" | ||
| environment: | ||
| SYNC_HOST: "0.0.0.0" | ||
| SYNC_PORT: "8000" |
Member
There was a problem hiding this comment.
This needs a change in all the composes here -- as this is referenced later in INIT_NODE_URL
Suggested change
| SYNC_PORT: "8000" | |
| SYNC_PORT: "${SYNC_PORT:-8000}" |
Now that I look I see our documentation has the same mistake (want to fix it there as well?) https://mozilla-services.github.io/syncstorage-rs/how-to/how-to-run-with-docker.html
| services: | ||
| syncserver: | ||
| image: ghcr.io/mozilla-services/syncstorage-rs/syncserver-postgres:${SYNCSERVER_VERSION:-latest} | ||
| image: ghcr.io/mozilla-services/syncstorage-rs/syncstorage-rs-mysql:${SYNCSERVER_VERSION:?set SYNCSERVER_VERSION to a published tag} |
Member
There was a problem hiding this comment.
any reason this switched to mysql? Even though it's just an example I think we want to encourage postgres as much as possible over mysql
| condition: service_healthy | ||
| restart: unless-stopped | ||
| healthcheck: | ||
| test: ["CMD", "curl", "-f", "http://localhost:8000/__heartbeat__"] |
Member
There was a problem hiding this comment.
Suggested change
| test: ["CMD", "curl", "-f", "http://localhost:8000/__heartbeat__"] | |
| test: ["CMD", "curl", "-f", "http://localhost:${SYNC_PORT:-8000}/__heartbeat__"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Attempt to configure Spanner and MySQL for easy "out-of-the-box" runs.
Issue(s)
Closes STOR-477.