Tweek api service can be configured by setting environment variables or by mounting /app/appsettings.Production.json file. In the json format, keys are configured as nested objects:

{
  "Some": {
        "Module": {
            "Url": "http://module:3000"
        }
  },
}

The equivalent environment variable configuration is:

Some__Module__Url=http://module:3000

Context configuration

Tweek context provider is pluggable as an addon.

For Redis provider, add the following configuration:

- UseAddon__Context=RedisContext
- Addons__Redis__AssemblyName=Tweek.Drivers.Redis
- Redis__ConnectionString=*******

For Couchbase provider add:

- UseAddon__Context=CouchbaseContext
- Couchbase__BucketName": "tweek-context"
- Couchbase__Password": "pass", #bucket password
- Couchbase__Url: "http://couchbase-url/"

For In-Memory context provider add:

- UseAddon__Context=InMemoryContext

Rules configuration

Tweek rules provider is pluggable as an addon.

For Minio provider, add the following configuration:

UseAddon__Rules: MinioRules
Rules__Minio__AccessKeyPath: /path/to/minio_access_key
Rules__Minio__Bucket: tweek
Rules__Minio__Endpoint: minio:9000
Rules__Minio__SecretKeyPath: /path/to/minio_secret_key

For File System provider, add the following configuration:

UseAddon__Rules: FileSystemRules
Rules__FileSystem__FilePath: /var/rules/rules_file

Monitoring

Tweek support Application Insights and Prometheus (through AppMetrics) for monitoring providers. Exposed metrics are available under http://api/metrics.

Tweek api has support for writing logs and metrics to Application Insights, to use it, add the following configuration:

- UseAddon__Metrics= ApplicationInsights
- ApplicationInsights__InstrumentationKey=*******