-
Notifications
You must be signed in to change notification settings - Fork 17
Configuration File
Configuration file defines how your application should be configured and deployed in the target environment (AWS). You can think of a configuration file as a manifest or a blueprint of the target infrastructure.
Here's a sample configuration file in YAML format:
name: echo
cluster: cluster1
port: 8080
cpu: 1.0
memory: 200m
units: 4
load_balancer:
enabled: true
https: no
port: 80
health_check:
interval: 30s
path: "/ping"
status: "200-299"
timeout: 10s
healthy_limit: 5
unhealthy_limit: 5
aws:
elb_name: echo_elb
elb_target_group_name: echo_elb_tg
elb_security_group_name: echo_elb_sg
ecr_namespace: coldbrew/echo
docker:
bin: "/usr/local/bin/docker"
Name of the application.
- Default: (application directory name)
- Limits: Max 32 characters. Alphanumeric, underline, and dash characters.
Name of the cluster where your application will run. You use cluster-create command to create a new cluster.
- Default:
"cluster1"
- Limits: Max 32 characters. Alphanumeric, underline, and dash characters.
Specify a port number if your application listens on a TCP port. This must match the value of EXPOSE
in Dockerfile
.
If your application does not listen on TCP port, specify 0
.
Multiple ports will be supported in the future release.
- Default:
80
CPU resources your application unit needs. 1.0
= 1 core unit.
- Default:
0.5
Memory limits for your application unit. You can use m
, `g' to indicate mega bytes and giga bytes.
- Default:
"500m"
The number of application units to deploy.
- Default:
1
Environment variables for your application. These variables will be passed to your application when they run in the container.
Set this to true
if you want to attach a load balancer to the application. Otherwise the application will not have a load balancer.
- Default:
false
Set this to true
to set up a HTTPS load balancer. This is not supported in the current version.
- Default:
false
Listening port (TCP) of the load balancer.
- Default:
80
Load balancer (ELB Target Group) does perform health checks on your application units.
Defines how often health check should be performed on each application unit.
- Default:
15s
Specifies the URL path for the health check. Load balancer will make a HTTP request to this URL path to determine application unit's health.
- Default:
"/"
Specifies expected HTTP status. To pass the health checks, your application needs to return these status codes when received a HTTP request on the health check path (.load_balancer.health_check.path
). This can be a single status (e.g. "200"
), multiple statuses ("200,201,202"
), or a range of status ("200-299"
).
- Default:
"200-299"
Timeout limits of each individual health check request. To pass the health check, your application needs to return HTTP status within this time limit.
- Default:
10s
If your application passes
- Default:
3
- Default:
3
If no ELB Load Balancer found with this name, CLI will create and configure a new one.
- Default:
"{application-name}-elb"
If no ELB Target Group found with this name, CLI will create and configure a new one.
- Default:
"{application-name}-elb-tg"
If no EC2 Security Group found with this name, CLI will create and configure a new one.
- Default:
"{application-name}-elb-sg"
- Default:
"coldbrew/{app-name}"
coldbrew-cli use docker
executable to build and push Docker images. You can use this to specify your own docker executable (e.g. "/usr/local/bin/docker"
)
- Default:
docker
When you deploy
your application for the first time, configuration file will be used to create and configure AWS resources for your application. If you make some changes in the configuration file and deploy
again, not all changes will be reflected immediately. See this for more details.
Typically you can put the configuration file at the root directory of your project, but, if the configuration file is located in different location, you can use --config
flag to specify its path (either absolute path or relative to the application directory).
Currently, json
or yaml
file formats are supported. You can specify the format using --config-format
flag.