-
Notifications
You must be signed in to change notification settings - Fork 426
Manifests
Efe Karakus edited this page Jun 29, 2020
·
21 revisions
The AWS Copilot CLI manifest describes the service’s architecture as infrastructure-as-code. It is a file generated from copilot init
or copilot svc init
that gets transpiled to an AWS CloudFormation template. Unlike raw CloudFormation templates, the manifest allows you to configure the most common settings for the architecture of your service and not the individual resources.
Manifest files are stored under the copilot/<your service name>/
directory.
List of all available properties for a 'Load Balanced Web App'
manifest.
# Your application name will be used in naming your resources like log groups, services, etc.
name: api
# The "architecture" of the application you're running.
type: Load Balanced Web App
image:
# Path to your application's Dockerfile.
build: api/Dockerfile
# Port exposed through your container to route traffic to it.
port: 80
http:
# Requests to this path will be forwarded to your service. lb-url.com/api/* will be forwarded
# to your service.
path: 'api'
# The path the LoadBalancer will call to make sure your app is healthy. The default is "/"
# healthcheck: "/"
# Number of CPU units for the task.
cpu: 256
# Amount of memory in MiB used by the task.
memory: 512
# Number of tasks that should be running in your service.
count: 1
variables: # Optional. Pass environment variables as key value pairs.
LOG_LEVEL: info
secrets: # Optional. Pass secrets from AWS Systems Manager (SSM) Parameter Store.
GITHUB_TOKEN: GITHUB_TOKEN # The key is the name of the environment variable, the value is the name of the SSM parameter.
# Optional. You can override any of the values defined above by environment.
environments:
test:
count: 2 # Number of tasks to run for the "test" environment.
List of all available properties for a 'Backend App'
manifest.
# Your application name will be used in naming your resources like log groups, services, etc.
name: api
# Your application is reachable at "http://api.${ECS_APP_DISCOVERY_ENDPOINT}:8080" but is not public.
type: Backend App
image:
# Path to your application's Dockerfile.
build: ./api/Dockerfile
# Port exposed through your container to route traffic to it.
port: 8080
#Optional, this field can be omitted.
healthcheck:
# The command the container runs to determine if it's healthy.
command: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 10s # Time period between healthchecks. Default is 10 if omitted.
retries: 2 # Number of times to retry before container is deemed unhealthy. Default is 2 if omitted.
timeout: 5s # How long to wait before considering the healthcheck failed. Default is 5s if omitted.
start_period: 0s # Grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. Default is 0s if omitted.
# Number of CPU units for the task.
cpu: 256
# Amount of memory in MiB used by the task.
memory: 512
# Number of tasks that should be running in your service.
count: 1
variables: # Pass environment variables as key value pairs.
LOG_LEVEL: info
secrets: # Pass secrets from AWS Systems Manager (SSM) Parameter Store.
GITHUB_TOKEN: GITHUB_TOKEN # The key is the name of the environment variable, the value is the name of the SSM parameter.
# Optional. You can override any of the values defined above by environment.
environments:
test:
count: 2 # Number of tasks to run for the "test" environment.