CCL Examples
These examples show common CCL configuration patterns.
Database Configuration
Section titled “Database Configuration”database = host = localhost port = 5432 name = myapp_prod /= Read the named environment variable in your application. credentials = username = admin password_env = DATABASE_PASSWORDMulti-Environment Config
Section titled “Multi-Environment Config”beta = mode = sandbox capacity = 2 feature_flags = new_ui = true api_v2 = false
prod = mode = live capacity = 8 feature_flags = new_ui = false api_v2 = trueServer List
Section titled “Server List”servers = = web1.example.com = web2.example.com = api.example.com
backup_servers = = backup1.example.com = backup2.example.comNested Configuration
Section titled “Nested Configuration”logging = level = info outputs = console = enabled = true format = json file = enabled = true path = /var/log/app.log rotation = dailyComments and Documentation
Section titled “Comments and Documentation”/= Application configuration/= Document changes near the setting they explain.
app = name = MyApp version = 2.0.0 /= Deprecated: Use feature_flags instead experimental_mode = falseAll examples use core CCL syntax: key-value pairs, empty-key lists, comments, and indentation.