Environment Configuration File
Each environment in a VPC will have a config file stored in your project. For example, a
file could be found in your project at
After modifying your environment config file, you can use the
workarea <env> update_json command to push your changes to your Environment.
Below is an annotated environment config file, which includes all the defaults (you may not see these in your Project's config file, though you can still add or override as you need):
Note: System integrators will not be able to update environment configuration files until v1.1 of the CLI, we felt it important to still document the role configuration files and their different settings play in how certain features are provisioned in an environment.
layers: # Attributes below only get used in the "App" layer of an Environment app: # Used when an environment has a non-standard name, # i.e. if your environment is named `myclient-stagingv5` # This isn't necessary if your environment is named `myclient-staging` rails_env: 'staging' # By default, if a deploy errors out, Chef will roll back to the previous version. # Setting this to false will not roll back, and keep the working directory # available for inspection at /var/www/weblinc_direct/current. # We don't recommend using this in production. rollback_on_error: true # When storing large files in git, it's recommended to use git-lfs. # Setting this to true will install git-lfs on your application servers. use_git_lfs: false # There are some cases where you may want to override the ELB HealthCheck # endpoint. By default, all ELB HC requests go to /health_check, those # requests are then proxied in the NGINX config through to a configurable # endpoint. # # Workarea v2 default endpoint: 'http://app/' # Workarea v3 and up default: 'http://app/up/load-balancing' # # If you don't have a good reason to modify the HealthCheck proxy target, # we recommend you leave this value to the default. health_check: proxy_pass_target: '/up/load-balancing' # Some projects require custom apt-packages be installed on app instances. # The example below means `apt-get install -y libxml2` will be ran during # the setup of an instance custom_packages: - 'libxml2' # Some clients use the AWS CloudWatch Logs service to send data back to their # own AWS account. Setting cloudwatch_logs.enabled to true will enable this. # See `wa_app::setup_cloudwatch_logs` for more information. cloudwatch_logs: enabled: true mongo: # Possible options for this are 3|4|5, depending on your version of Mongoid. # Required only for Workarea V2 or less. mongoid_major_version: 4 # In the example below, the default Mongoid session will always point to the # `dogsarecool_staging` database, and when visiting `www.catsarecooltoo.com`, # the `www_catsarecooltoo_com` Mongoid session will be used. # Required only for Workarea V2 or less. sites: www_dogsarecool_com: default_site: true database_name: 'dogsarecool_staging' www_catsarecooltoo_com database_name: 'catsarecool_staging' # Attributes below are used in an Environment's Stack JSON. They are accessible by # Chef runs on all layers. stack: nginx: # NGINX and by extension, Rack, defaults to using the `X-Forwarded-For` header # to determine the real IP address a request comes from. There are some cases # where a Client may proxy requests through to a Workarea Environment, # needing to change the header used to determine the real IP of the # request. real_ip_header: 'X-Forwarded-For' # NGINX defaults to allowing POST request bodys of 10MB or less. # If your app requires allowing larger POST bodys, modify the attribute below. client_max_body_size_in_megabytes: 10 proxy: # All outbound requests in an environment go through an HTTP proxy by default. # In some cases, an Environment may be required to talk to a VPN over HTTP, # direct from an App server to a VPN. In this case, we want to exclude requests # to that Host from going through the Proxy. exclude_domains: - '10.83.12.5' # The workarea infrastructure version denotes what version of the cookbooks, # recipes, and other infrastructure artifacts your environment is provisioned # against. It's best not to touch this. workarea_infra_version: 1.0.2
How'd We Do?
Was this article missing something?
Was it not quite what you were looking for?
Do you have suggestions on how we could improve this article or your experience in general?
If so, please take a moment to let us know!
Your invaluable feedback will help everyone better understand the platform!