Configuration options
Both Sync Core and Broker
Queue
SYNC_CORE_QUEUE_URL: The queue that the Sync Core container(s) will use to process messages. The Broker will publish messages to this queue, and the Sync Core will publish and subscribe to messages.- If you are using TLS encryption start the URL with
amqps://instead ofamqp://. - We recommend providing a heartbeat of 15s in the URL like
?heartbeat=15.
- If you are using TLS encryption start the URL with
BROKER_QUEUE_URL: The queue that the Broker container(s) will use to process messages. The Sync Core will publish messages to this queue, and the Broker will publish and subscribe to messages.- If you are using TLS encryption start the URL with
amqps://instead ofamqp://. - We recommend providing a heartbeat of 15s in the URL like
?heartbeat=15.
- If you are using TLS encryption start the URL with
MESSAGE_PREFETCH_COUNTdefault50: How many messages to prefetch per container. If you are scaling based on CPU usage, this option must be fine-tuned to avoid both overloading, and a failure to scale (under-usage) while the queue is piling up messages.
Database
DATABASE_URLrequired: The full mongodb URL, including the database name to store all data. You can provide a different database to the Broker, and the Sync Core (makes scaling easier).DATABASE_RETRY_ATTEMPTSoptional, default10: Number of retries to connect or reconnect to the database before killing the process.DATABASE_LOG_LEVELoptional, one oferror,warn,info,debug, defaultwarn: Log level for the database.DATABASE_ENABLE_SSLoptional, one oftrueorfalse, default (empty): Usually not required if you enable ssl/tls using the query parameters of theDATABASE_URL. If you run into a connection timeout, try removingssl=trueandtls=truefrom the database URL and use these environment variables instead. Experienced this issue when using CosmosDB.DATABASE_ENABLE_TLSoptional, one oftrueorfalse, default (empty): Usually not required; same asDATABASE_ENABLE_SSL, but for a different library internally; set to the same value as yourDATABASE_ENABLE_SSLvariable.
Logging
LOG_LEVELoptional, default info: Eithererror,warn,info,verboseordebug.LOG_FORMAToptional, defaultplain: Eitherplainorjson.
Health checks
HEALTH_EVENT_LOOP_SAMPLE_INTERVALoptional, default50: How often to run the event loop check in milliseconds, i.e. CPU usage based on ticks of the app.HEALTH_EVENT_LOOP_LIMIToptional, default500: How long a tick may last before it’s considered unhealthy in milliseconds, i.e. the allowed delay for the sample tick to run.HEALTH_DNS_URLoptional, defaulthttps://www.google.com/: What URL to use for DNS health checks. Should be an external, public service to be comparable to your sites but shouldn’t be your sites to avoid cascading failures.HEALTH_MEMORY_LIMIToptional, default512: How much RAM the application is expected to use in MB before the health check fails. Should be your container RAM limit minus 384.
Sync Core
General
SERVICE_NAMErequired: Must besync-core.SYNC_CORE_UUIDrequired: Provided at app.cms-content-sync.io.SYNC_CORE_SECRETrequired: Provided at app.cms-content-sync.io.SERVICE_TYPESdefaultrest,queue: One of:rest,queueorrest,queue.FEATURE_FLAGSas a comma-separated list, default (empty): A list of feature flags to statically configure. See below for a list of all feature flags.PORTdefault8080: The HTTP port to listen to.AUTHENTICATION_ENCRYPTION_SECRETdefaultSYNC_CORE_SECRETstrongly recommended: A custom secret to use for encrypting the credentials that the Sync Core uses to access connected sites. Expects a 64-length random hex string e.g. fromopenssl rand -hex 32(32 bytes = 64 hex string).
Security
DISABLE_HEADER_PROTECTIONdefaultno(so enabled): Disable protection against commonly abused headers. Not required unless you are using customized clients.RATE_LIMIT_TIME_WINDOW_IN_MINUTESdefault5: Limit requests per client / IP.RATE_LIMIT_NUMBER_OF_REQUESTSdefault2000: Limit requests in the given time window to this number. This is per container, so if you are using a rate limiting WAF anyway, you can leave this to any high enough value.
Files
General
LOCAL_FILESYSTEMdefaultno: One ofyesorno. Whether you want to use the local file system for file storage (yes) or S3 (no).MAX_FILE_SIZE_PREVIEWin bytes, default10240(10 KB): The maximum size allowed for a preview HTML. This will be indexed in ElasticSearch, so this has significant impact on the search performance and required storage.MAX_FILE_SIZE_FLOW_CONFIGin bytes, default5242880(5 MB): The maximum size allowed for a Flow YAML file. So the maximum required storage for Flow configs is (number of sites) * (flows per site) * (this value). If a site exceeds this it can’t connect to the Sync Core so limit with caution.MAX_FILE_SIZE_CONTENT_FILEin bytes, default10485760(10 MB): The maximum size allowed for a content file (a file a user uploaded to a site). Updates will be rejected if they contain a file larger than this, so limit with caution.
Local
MAX_FILE_SIZE_LOCAL_UPLOADin bytes, default10485760(10 MB): If you are using the local file system to store files, no files larger than this can be uploaded. Must be as big as the largest file size restriction above.
S3
AWS_ACCESS_KEY_IDdefault (empty): If using S3, the Access Key ID from your AWS user used for uploading and downloading files.AWS_SECRET_ACCESS_KEYdefault (empty): If using S3, see above.AWS_S3_BUCKETdefault (empty): If using S3, the bucket to store files in.AWS_REGIONdefault (empty): If using S3, the region where the bucket has been created.
Search
ELASTICSEARCH_URLdefault (empty): A full URL to yor ElasticSearch backend that we can use to index content items and their preview and to search for content in the Pull Dashboard. If you are not using the manual pull option you won’t need this.ELASTICSEARCH_ADD_KEYWORD_SUFFIXdefault (empty): One of:yes,no. Not required in most cases. If you forgot to setup the search index before indexing documents, Elasticsearch will not change the existing field types but rather create new fields with a.keywordsuffix. In this case, passyesas a value.
Requests
REQUEST_TIMEOUTin milliseconds, default60000(60 seconds): The default timeout for all requests. Can be overwritten for different kinds of requests (see below).REQUEST_TIMEOUT_DOWNLOAD_PREVIEWin milliseconds, default (REQUEST_TIMEOUT): The timeout for requesting an HTML preview from a site for a given entity.REQUEST_TIMEOUT_UPDATE_ENTITYin milliseconds, default (REQUEST_TIMEOUT): The timeout for sending an update request to a connected site for an entity.REQUEST_TIMEOUT_DOWNLOAD_FILEin milliseconds, default (REQUEST_TIMEOUT): The timeout for downloading a file from a site.REQUEST_TIMEOUT_UPLOAD_FILEin milliseconds, default (REQUEST_TIMEOUT): The timeout for uploading a file to S3 (if S3 is used).REQUEST_MAX_REDIRECTSdefault5: The max number of redirects to follow when making a request against a site.REQUEST_MAX_RESPONSE_BODY_SIZEin bytes, default4194304(4MB): The max allowed response body size when making a request against a site to update or retrieve an entity or entity list.DEFAULT_MAX_REQUESTS_PER_MINUTE_PER_SITEdefault20: How many requests will be made to a site per minute by default. Users can overwrite this setting per site or set another default for all sites in their project.DEFAULT_MAX_PARALLEL_REQUESTS_PER_SITEdefault10: How many requests will be made to a site in parallel by default. Users can overwrite this setting per site or set another default for all sites in their project. This is only relevant for requests that couldn’t be processed immediately (because the per-minute limit throttled them or because they failed) and is only used by the cron that processes these messages once a minute.
Broker
SERVICE_NAMErequired: Must bebroker.MESSAGE_LIMIT_PER_CRON_RUNdefault1000: How many messages to process per cron run. If you see e.g.ECONNRESETduring cron job runs from RabbitMQ use this setting to decrease the load.