# Keys beginning with "cpln_" correspond to your settings in Control Plane. # Global settings that apply to `cpl` usage. # You can opt out of allowing the use of CPLN_ORG and CPLN_APP env vars # to avoid any accidents with the wrong org / app. allow_org_override_by_env: true allow_app_override_by_env: true aliases: common: &common # Organization for staging and QA apps is typically set as an alias. # Production apps will use a different organization, specified in `apps`, for security. # Change this value to your organization name # or set the CPLN_ORG env var and it will override this for all `cpl` commands # (provided that `allow_org_override_by_env` is set to `true`). cpln_org: my-org-staging # Control Plane offers the ability to use multiple locations. # default_location is used for commands that require a location # including `ps`, `run`, `apply-template`. # This can be overridden with option --location= and # CPLN_LOCATION environment variable. # TODO: Allow specification of multiple locations. default_location: aws-us-east-2 # Allows running the command `cpl setup-app` # instead of `cpl apply-template app redis postgres memcached rails sidekiq`. # # Note: # 1. These names correspond to files in the `./controlplane/templates` directory. # 2. Each file can contain many objects, such as in the case of templates that create a resource, like `postgres`. # 3. While the naming often corresponds to a workload or other object name, the naming is arbitrary. # Naming does not need to match anything other than the file name without the `.yml` extension. setup_app_templates: - app - redis - postgres - memcached - rails - sidekiq # Uncomment next line to skips secrets setup when running `cpl setup-app`. # skip_secrets_setup: true # Only needed if using a custom secrets name. # The default is '{APP_PREFIX}-secrets'. For example: # - for an app 'my-app-staging' with `match_if_app_name_starts_with` set to `false`, # it would be 'my-app-staging-secrets' # - for an app 'my-app-review-1234' with `match_if_app_name_starts_with` set to `true`, # it would be 'my-app-review-secrets' secrets_name: my-secrets # Only needed if using a custom secrets policy name. # The default is '{APP_SECRETS}-policy'. For example: # - for an app 'my-app-staging' with `match_if_app_name_starts_with` set to `false`, # it would be 'my-app-staging-secrets-policy' # - for an app 'my-app-review-1234' with `match_if_app_name_starts_with` set to `true`, # it would be 'my-app-review-secrets-policy' secrets_policy_name: my-secrets-policy # Configure the workload name used as a template for one-off scripts, like a Heroku one-off dyno. one_off_workload: rails # Workloads that are for the application itself and are using application Docker images. # These are updated with the new image when running the `deploy-image` command, # and are also used by the `info` and `ps:` commands in order to get all of the defined workloads. # On the other hand, if you have a workload for Redis, that would NOT use the application Docker image # and not be listed here. app_workloads: - rails - sidekiq # Additional "service type" workloads, using non-application Docker images. # These are only used by the `info` and `ps:` commands in order to get all of the defined workloads. additional_workloads: - redis - postgres - memcached # Configure the workload name used when maintenance mode is on (defaults to "maintenance"). maintenance_workload: maintenance # Fixes the remote terminal size to match the local terminal size # when running `cpl run`. fix_terminal_size: true # Sets a default CPU size for `cpl run` jobs (can be overridden per job through `--cpu`). # If not specified, defaults to "1" (1 core). runner_job_default_cpu: "2" # Sets a default memory size for `cpl run` jobs (can be overridden per job through `--memory`). # If not specified, defaults to "2Gi" (2 gibibytes). runner_job_default_memory: "4Gi" # Sets the maximum number of seconds that `cpl run` jobs can execute before being stopped. # If not specified, defaults to 21600 (6 hours). runner_job_timeout: 1000 # Apps with a deployed image created before this amount of days will be listed for deletion # when running the command `cpl cleanup-stale-apps`. stale_app_image_deployed_days: 5 # Images that exceed this quantity will be listed for deletion # when running the command `cpl cleanup-images`. image_retention_max_qty: 20 # Images created before this amount of days will be listed for deletion # when running the command `cpl cleanup-images` (`image_retention_max_qty` takes precedence). image_retention_days: 5 apps: my-app-staging: # Use the values from the common section above. <<: *common my-app-review: <<: *common # If `match_if_app_name_starts_with` is `true`, then use this config for app names starting with this name, # e.g., "my-app-review-pr123", "my-app-review-anything-goes", etc. match_if_app_name_starts_with: true # Hooks can be either a script path that exists in the app image or a command. # They're run in the context of `cpl run` with the latest image. hooks: # Used by the command `cpl setup-app` to run a hook after creating the app. post_creation: bundle exec rake db:prepare # Used by the command `cpl delete` to run a hook before deleting the app. pre_deletion: bundle exec rake db:drop my-app-production: <<: *common # You can also opt out of allowing the use of CPLN_ORG and CPLN_APP env vars per app. # It's recommended to leave this off for production, to avoid any accidents. allow_org_override_by_env: false allow_app_override_by_env: false # Use a different organization for production. cpln_org: my-org-production # Allows running the command `cpl promote-app-from-upstream -a my-app-production` # to promote the staging app to production. upstream: my-app-staging # Used by the command `cpl promote-app-from-upstream` to run a release script before deploying. # This is relative to the `.controlplane/` directory. release_script: release_script # default_domain is used for commands that require a domain # including `maintenance`, `maintenance:on`, `maintenance:off`. default_domain: domain.com my-app-other: <<: *common # You can specify a different `Dockerfile` relative to the `.controlplane/` directory (defaults to "Dockerfile"). dockerfile: ../some_other/Dockerfile