-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathlocal.example.toml
More file actions
95 lines (78 loc) · 4.51 KB
/
Copy pathlocal.example.toml
File metadata and controls
95 lines (78 loc) · 4.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# =============================================================================
# Default out-of-the-box configuration: MySQL build
# =============================================================================
#
# This is a ready-to-edit template for running syncstorage-rs against the
# standard MySQL build (the default `cargo build` / `make run_mysql` target,
# and the `syncstorage-rs-mysql` Docker image). It runs both Syncstorage and
# Tokenserver against MySQL.
#
# Copy it to `config/local.toml` and edit the values marked REQUIRED:
#
# cp config/local.example.toml config/local.toml
#
# Every setting can also be supplied as an environment variable prefixed with
# `SYNC_` (nested keys use `__`), e.g. `syncstorage.database_url` becomes
# `SYNC_SYNCSTORAGE__DATABASE_URL`. Environment variables take precedence over
# the config file. See the full reference at docs/src/config.md, and the
# annotated `Settings` structs in `*-settings/src/lib.rs`.
#
# For the Spanner build, see `config/local.example.spanner.toml`.
# =============================================================================
# REQUIRED. Secret used to derive the Hawk signing/token secrets. Use a long,
# random string in any real deployment. No default; the server cannot
# authenticate requests without it.
master_secret = "INSERT_SECRET_KEY_HERE"
# Host/port the server binds to. Defaults: host = "127.0.0.1", port = 8000.
# Use "0.0.0.0" inside containers so the port is reachable from the host.
host = "127.0.0.1"
port = 8000
# Emit human-readable logs instead of mozlog JSON. Default: false (0).
# Leave JSON logging on for production; it is the format our tooling expects.
human_logs = 1
# -----------------------------------------------------------------------------
# Syncstorage (BSO storage service)
# -----------------------------------------------------------------------------
# Enable the Syncstorage service. Default: true.
syncstorage.enabled = true
# REQUIRED when syncstorage is enabled. MySQL DSN for the syncstorage database.
# There is no usable default: the server fails fast at startup if it is unset,
# rather than silently connecting to a default host.
syncstorage.database_url = "mysql://sample_user:sample_password@localhost/syncstorage_rs"
# Max size of the syncstorage DB connection pool. Default: 10.
# syncstorage.database_pool_max_size = 10
# Quota tracking/enforcement are Spanner-only features and are force-disabled
# for non-Spanner backends, so they have no effect on the MySQL build.
syncstorage.enable_quota = 0
# Request/batch limits. Defaults shown in docs/src/config.md (Syncstorage
# Limits). `max_total_records` is also used to cap MySQL `get_bsos` result
# sizes; see issues #298/#333.
syncstorage.limits.max_total_records = 9984
# -----------------------------------------------------------------------------
# Tokenserver (node assignment + FxA OAuth verification)
# -----------------------------------------------------------------------------
# Enable Tokenserver. Default: false. Enable it for a self-contained server
# that both assigns nodes and stores data.
tokenserver.enabled = true
# REQUIRED when tokenserver is enabled. MySQL DSN for the tokenserver database.
# No usable default; the server fails fast at startup if it is unset.
tokenserver.database_url = "mysql://sample_user:sample_password@localhost/tokenserver_rs"
# Backend type reported in the token response (telemetry only). For the MySQL
# build set this to "mysql". Default: "spanner". Valid: "mysql"/"postgres"/"spanner".
tokenserver.node_type = "mysql"
# Run the tokenserver DB migrations on startup. Default: false.
# tokenserver.run_migrations = true
# FxA environment used to verify OAuth tokens. The defaults below point at the
# FxA *stage* environment; point them at production for a real deployment
# (fxa_email_domain = "api.accounts.firefox.com",
# fxa_oauth_server_url = "https://oauth.accounts.firefox.com").
tokenserver.fxa_email_domain = "api-accounts.stage.mozaws.net"
tokenserver.fxa_oauth_server_url = "https://oauth.stage.mozaws.net"
# REQUIRED for real deployments. Secret used to hash users' metrics UIDs so
# they stay anonymous. Default: "secret" (fine for local dev only).
tokenserver.fxa_metrics_hash_secret = "INSERT_SECRET_KEY_HERE"
# -----------------------------------------------------------------------------
# CORS (optional; sensible defaults applied when unset)
# -----------------------------------------------------------------------------
# cors_allowed_origin = "localhost" # Default: "*"
# cors_max_age = 86400 # Default: 1728000 (20 days)