-
Notifications
You must be signed in to change notification settings - Fork 49
Settings
All settings for sync are specified either in a configuration file or as Environment variables.
For ease, the following lists these as environment variables.
Each variable requires a PREFIX. The default is SYNC
which is prepended to each environment variable.
-
SYNC_ACTIX_KEEP_ALIVE [
5
] - Override the default actix Keep Alive -
SYNC_CORS_ALLOWED_HEADERS [ see source ]
-
SYNC_CORS_ALLOWED_METHODS [
["DELETE", "GET", "POST", "PUT"]
] -
SYNC_CORS_ALLOWED_ORIGIN [
"*"
] - CORS allowed origin for requests -
SYNC_CORS_MAX_AGE [
1728000
] - Max age for request -
SYNC_HOST [
127.0.0.1
] - Default Application host name (for network binding) -
SYNC_HUMAN_LOGS [
FALSE
] - Display log output in more human friendly form, rather than JSON -
SYNC_MASTER_SECRET [
None
] - String containing the master secret bytes -
SYNC_PORT [
8000
] - Default Application Port (for network binding) -
SYNC_STATSD_HOST [
"localhost"
] - Name of host to send metric info -
SYNC_STATSD_PORT [
8125
] - Port to send metric info -
SYNC_SYNCSTORAGE__DATABASE_POOL_CONNECTION_LIFESPAN [NONE] - Max lifespan for pooled connections
-
SYNC_SYNCSTORAGE__DATABASE_POOL_CONNECTION_MAX_IDLE [NONE] - Max allowed idle time for pooled connections
-
SYNC_SYNCSTORAGE__DATABASE_POOL_CONNECTION_TIMEOUT [
30
] - Timeout detection for pooled connections -
SYNC_SYNCSTORAGE__DATABASE_POOL_MAX_SIZE [
10
] - Number of cached database connections for the pool -
SYNC_SYNCSTORAGE__DATABASE_POOL_MIN_IDLE [None] - Minimum guaranteed idle time for pooled connections
-
SYNC_SYNCSTORAGE__DATABASE_URL [
"mysql://[email protected]/syncstorage"
] - DSN for the storage database -
SYNC_SYNCSTORAGE__DATABASE_USE_TEST_TRANSACTIONS [
FALSE
] - Use debugging transactions (only ifdebug_assertions
feature is set) -
SYNC_SYNCSTORAGE__ENABLE_QUOTA [
FALSE
] - Enable user storage quota detection -
SYNC_SYNCSTORAGE__ENABLED [
TRUE
] - Is storage enabled -
SYNC_SYNCSTORAGE__ENFORCE_QUOTA [
FALSE
] - Enforce user storage quotas -
SYNC_SYNCSTORAGE__LBHEARTBEAT_TTL [None] - Load balancer heartbeat period
-
SYNC_SYNCSTORAGE__LBHEARTBEAT_TTL_JITTER [
25
] - Jitter for the load balancer heartbeat period -
SYNC_SYNCSTORAGE__LIMITS__MAX_POST_BYTES [DEFAULT_MAX_POST_BYTES] - Maximum allowed data size for an incoming POST
-
SYNC_SYNCSTORAGE__LIMITS__MAX_POST_RECORDS [DEFAULT_MAX_POST_RECORDS] - Max number of records per POST
-
SYNC_SYNCSTORAGE__LIMITS__MAX_QUOTA_LIMIT [DEFAULT_MAX_QUOTA_LIMIT] - Max data allowed per user
-
SYNC_SYNCSTORAGE__LIMITS__MAX_RECORD_PAYLOAD_BYTES [DEFAULT_MAX_RECORD_PAYLOAD_BYTES] - Max size of individual records in POST
-
SYNC_SYNCSTORAGE__LIMITS__MAX_REQUEST_BYTES [DEFAULT_MAX_REQUEST_BYTES] - Max number of bytes to return for a GET
-
SYNC_SYNCSTORAGE__LIMITS__MAX_TOTAL_BYTES [DEFAULT_MAX_TOTAL_BYTES] - Max size of data allowed per collection per user if quotas enabled
-
SYNC_SYNCSTORAGE__LIMITS__MAX_TOTAL_RECORDS [DEFAULT_MAX_TOTAL_RECORDS] - Max total records allowed per collection per user if quotas enabled
-
SYNC_SYNCSTORAGE__SPANNER_EMULATOR_HOST [None] - if using spanner, specify the emulator host name (can be different than DSN)
-
SYNC_SYNCSTORAGE__STATSD_LABEL [
"syncstorage"
] - Metric prefix label -
SYNC_TOKENSERVER__ADDITIONAL_BLOCKING_THREADS_FOR_FXA_REQUESTS [
1
] - Number of blocking threads for FxA -
SYNC_TOKENSERVER__DATABASE_POOL_CONNECTION_TIMEOUT [
30
] - Timeout value for the Tokenserver Database connection pool -
SYNC_TOKENSERVER__DATABASE_POOL_MAX_SIZE [
10
] - Pool size for the Tokenserver Database connection pool -
SYNC_TOKENSERVER__DATABASE_POOL_MIN_IDLE [None] - Minimum idle time for the Tokenserver Database connection pool
-
SYNC_TOKENSERVER__DATABASE_URL [
"mysql://[email protected]/tokenserver"
] - DSN for the Tokenserver Database -
SYNC_TOKENSERVER__ENABLED [
FALSE
] - Is the internal Tokenserver enabled? -
SYNC_TOKENSERVER__FXA_BROWSERID_AUDIENCE [
"https://token.stage.mozaws.net"
] - Default BrowserID audience (legacy) -
SYNC_TOKENSERVER__FXA_BROWSERID_CONNECT_TIMEOUT [
5
] - Default BrowserID connect timeout (legacy) -
SYNC_TOKENSERVER__FXA_BROWSERID_ISSUER [
"api-accounts.stage.mozaws.net"
] - Default BrowserID issuer (legacy) -
SYNC_TOKENSERVER__FXA_BROWSERID_REQUEST_TIMEOUT [
10
] - Default BrowserID timeout (legacy) -
SYNC_TOKENSERVER__FXA_BROWSERID_SERVER_URL [
"https://verifier.stage.mozaws.net/v2"
] - Default BrowserID server (legacy) -
SYNC_TOKENSERVER__FXA_EMAIL_DOMAIN [
"api-accounts.stage.mozaws.net"
] - Domain to use for FxA email accounts -
SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET [
"secret"
] - String containing the byte array for the FxA Metrics Hash -
SYNC_TOKENSERVER__FXA_OAUTH_PRIMARY_JWK [None] - String containing the default FxA OAuth Primary JSON Web Key
-
SYNC_TOKENSERVER__FXA_OAUTH_REQUEST_TIMEOUT [
10
] - Default timeout for requests to the FxA OAuth Server -
SYNC_TOKENSERVER__FXA_OAUTH_SECONDARY_JWK [None] - String containing the default FxA OAuth Secondary JSON Web Key
-
SYNC_TOKENSERVER__FXA_OAUTH_SERVER_URL [
"https://oauth.stage.mozaws.net"
] - URL for the FxA OAuth Server validation requests -
SYNC_TOKENSERVER__NODE_CAPACITY_RELEASE_RATE [None] - How often should nodes be turned over? (legacy)
-
SYNC_TOKENSERVER__NODE_TYPE [
"Spanner"
] - The type of node to use by default -
SYNC_TOKENSERVER__RUN_MIGRATIONS [cfg!(test)] - Flag to run the migrations (note, a bit unstable, thus the
test
feature) -
SYNC_TOKENSERVER__SPANNER_NODE_ID [None] - Node number to indicate "spanner" storage (legacy)
-
SYNC_TOKENSERVER__STATSD_LABEL [
"syncstorage.tokenserver"
] - Default label for Metrics -
SYNC_TOKENSERVER__TOKEN_DURATION [
3600
] - Max TTL in seconds a token should live.