Files
athens/config.example.toml
2018-08-31 16:15:16 -04:00

148 lines
5.4 KiB
TOML

# This is an example configuration with all supported properties explicitly set
# Most properties can be overriden with environment variables specified in this file
# Most properties also have defaults (mentioned in this file) if they are not set in either the config file or the corresponding environment variable
# GoBinary returns the path to the go binary to use. This value can be a name of a binary in your PATH, or the full path
# Defaults to "go"
# Env override: GO_BINARY_PATH
GoBinary = "go"
# GoEnv returns the type of environment to run.
# Supported values are: 'development' and 'production'. Defaults to "development"
# Env override: GO_ENV
GoEnv = "development"
# LogLevel returns the system's exposure to internal logs. Defaults to debug.
# Supports all logrus log levels (https://github.com/Sirupsen/logrus#level-logging)
# Env override: ATHENS_LOG_LEVEL
LogLevel = "debug"
# CloudRuntime is the Cloud Provider on which the Proxy/Registry is running.
# Currently available options are "GCP", or "none". Defaults to "none"
# Env override: ATHENS_CLOUD_RUNTIME
CloudRuntime = "none"
# MaxConcurrency sets maximum level of concurrency
# Defaults to number of cores if not specified.
# Env override: ATHENS_MAX_CONCURRENCY
MaxConcurrency = 4
# The maximum number of failures for jobs submitted to buffalo workers
# Defaults to 5.
# Env override: ATHENS_MAX_WORKER_FAILS
MaxWorkerFails = 5
# The filename for the include exclude filter. Defaults to 'filter.conf'
# Env override: ATHENS_FILTER_FILE
FilterFile = "filter.conf"
# Timeout is the timeout for external network calls in seconds
# This value is used as the default for storage backends if they don't specify timeouts
# Defaults to 300
# Env override: ATHENS_TIMEOUT
Timeout = 300
# EnableCSRFProtection determines whether to enable CSRF protection.
# Defaults to false
# Env override: ATHENS_ENABLE_CSRF_PROTECTION
EnableCSRFProtection = false
[Proxy]
# StorageType sets the type of storage backend the proxy will use.
# Possible values are memory, disk, mongo, postgres, sqlite, cockroach, mysql
# Defaults to mongo
# Env override: ATHENS_STORAGE_TYPE
StorageType = "memory"
# Port sets the port the proxy listens on
# Env override: PORT
Port = ":3000"
# The endpoint for Olympus in case of a proxy cache miss
# Env override: OLYMPUS_GLOBAL_ENDPOINT
OlympusGlobalEndpoint = "http://localhost:3001"
# Redis queue for buffalo workers
# Defaults to ":6379"
# Env override: ATHENS_REDIS_QUEUE_PORT
RedisQueueAddress = ":6379"
# Flag to turn off Proxy Filter middleware
# Defaults to true
# Env override: PROXY_FILTER_OFF
FilterOff = true
# Username for basic auth
# Env override: BASIC_AUTH_USER
BasicAuthUser = ""
# Password for basic auth
# Env override: BASIC_AUTH_PASS
BasicAuthPass = ""
[Olympus]
# StorageType sets the type of storage backend Olympus will use.
# Possible values are memory, disk, mongo, postgres, sqlite, cockroach, mysql
# Defaults to memory
# Env override: ATHENS_STORAGE_TYPE
StorageType = "memory"
# Port sets the port olympus listens on
# Env override: PORT
Port = ":3001"
# Background worker type. Possible values are memory and redis
# Defaults to redis
# Env override: OLYMPUS_BACKGROUND_WORKER_TYPE
WorkerType = "redis"
# Redis queue for buffalo workers
# Defaults to ":6379"
# Env override: OLYMPUS_REDIS_QUEUE_PORT
RedisQueueAddress = ":6379"
[Storage]
# Only storage backends that are specified in Proxy.StorageType or Olympus.StorageType are required here
[Storage.CDN]
# Endpoint for CDN storage
# Env override: CDN_ENDPOINT
Endpoint = "cdn.example.com"
# Timeout for networks calls made to the CDN in seconds
# Defaults to Global Timeout
Timeout = 300
[Storage.Disk]
# RootPath is the Athens Disk Root folder
# Env override: ATHENS_DISK_STORAGE_ROOT
RootPath = "/path/on/disk"
[Storage.GCP]
# ProjectID to use for GCP Storage
# Env overide: GOOGLE_CLOUD_PROJECT
ProjectID = "MY_GCP_PROJECT_ID"
# Bucket to use for GCP Storage
# Env override: ATHENS_STORAGE_GCP_BUCKET
Bucket = "MY_GCP_BUCKET"
# Timeout for networks calls made to GCP in seconds
# Defaults to Global Timeout
Timeout = 300
[Storage.Minio]
# Endpoint for Minio storage
# Env override: ATHENS_MINIO_ENDPOINT
Endpoint = "minio.example.com"
# Access Key for Minio storage
# Env override: ATHENS_MINIO_ACCESS_KEY_ID
Key = "MY_KEY"
# Secret Key for Minio storage
# Env override: ATHENS_MINIO_SECRET_ACCESS_KEY
Secret = "MY_SECRET"
# Timeout for networks calls made to Minio in seconds
# Defaults to Global Timeout
Timeout = 300
# Enable SSL for Minio connections
# Defaults to true
# Env override: ATHENS_MINIO_USE_SSL
EnableSSL = true
# Minio Bucket to use for storage
# Defaults to gomods
# Env override: ATHENS_MINIO_BUCKET_NAME
Bucket = "gomods"
[Storage.Mongo]
# Full URL for mongo storage
# Env override: ATHENS_MONGO_STORAGE_URL
URL = "mongo.example.com"
# Timeout for networks calls made to Mongo in seconds
# Defaults to Global Timeout
# Env override: MONGO_CONN_TIMEOUT_SEC
Timeout = 300