# The manifest for the "{{.Name}}" service. # Read the full specification for the "Worker Service" type at: # https://aws.github.io/copilot-cli/docs/manifest/worker-service/ # Your service name will be used in naming your resources like log groups, ECS services, etc. name: {{.Name}} type: {{.Type}} # Configuration for your containers and service. image: {{- if .ImageConfig.Image.Build.BuildArgs.Dockerfile}} # Docker build arguments. build: {{.ImageConfig.Image.Build.BuildArgs.Dockerfile}} {{- end}} {{- if .ImageConfig.Image.Location}} location: {{.ImageConfig.Image.Location}} {{- end}} {{- if not .ImageConfig.HealthCheck.IsEmpty}} healthcheck: # Container health checks command: {{fmtSlice (quoteSlice .ImageConfig.HealthCheck.Command)}} interval: {{.ImageConfig.HealthCheck.Interval}} retries: {{.ImageConfig.HealthCheck.Retries}} timeout: {{.ImageConfig.HealthCheck.Timeout}} start_period: {{.ImageConfig.HealthCheck.StartPeriod}} {{- end}} cpu: {{.CPU}} # Number of CPU units for the task. memory: {{.Memory}} # Amount of memory in MiB used by the task. {{- if .Platform.PlatformString}} platform: {{.Platform.PlatformString}} # See https://aws.github.io/copilot-cli/docs/manifest/worker-service/#platform {{- end}} count: {{.Count.Value}} # Number of tasks that should be running in your service. {{- if not .TaskConfig.IsWindows }} exec: true # Enable running commands in your container. {{- end}} {{- if not .TaskConfig.IsWindows}} # storage: # readonly_fs: true # Limit to read-only access to mounted root filesystems. {{- end}} {{if .Subscribe}}{{- if .Subscribe.Topics}} # The events can be received from an SQS queue via the env var $COPILOT_QUEUE_URI. subscribe: topics: {{- range $topic := .Subscribe.Topics}} - name: {{$topic.Name}} service: {{$topic.Service}} {{- if $topic.Queue.Enabled }} queue: {{ $topic.Queue.Enabled }} {{- end }} {{- end}} {{- if .Subscribe.Queue.FIFO.Enable }} queue: fifo: {{ .Subscribe.Queue.FIFO.Enable }} {{- end }} {{- else}} # You can register to topics from other services. # The events can be received from an SQS queue via the env var $COPILOT_QUEUE_URI. # subscribe: # topics: # - name: topic-from-another-service # service: another-service {{- end}}{{- end}} # Optional fields for more advanced use-cases. # #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. {{- if not .Environments}} # You can override any of the values defined above by environment. #environments: # test: # count: 2 # Number of tasks to run for the "test" environment. # deployment: # The deployment strategy for the "test" environment. # rolling: 'recreate' # Stops existing tasks before new ones are started for faster deployments. {{- else}} # You can override any of the values defined above by environment. environments: {{ range $key, $value := .Environments}} {{$key}}: {{- if $value.Network.VPC.Placement.PlacementString}} network: vpc: placement: '{{$value.Network.VPC.Placement.PlacementString}}' # The tasks will be placed on private subnets for the "{{$key}}" environment. {{- end}} {{- end}} # test: # count: 2 # Number of tasks to run for the "test" environment. # deployment: # The deployment strategy for the "test" environment. # rolling: 'recreate' # Stops existing tasks before new ones are started for faster deployments. {{- end}}