1
+ # The manifest for the "{{.Name}}" service.
2
+ # Read the full specification for the "Worker Service" type at:
3
+ # https://aws.github.io/copilot-cli/docs/manifest/worker-service/
4
+
5
+ # Your service name will be used in naming your resources like log groups, ECS services, etc.
6
+ name : {{.Name}}
7
+ type : {{.Type}}
8
+
9
+ # Configuration for your containers and service.
10
+ image :
11
+ {{- if .ImageConfig.Build.BuildArgs.Dockerfile}}
12
+ # Docker build arguments.
13
+ build : {{.ImageConfig.Build.BuildArgs.Dockerfile}}
14
+ {{- end}}
15
+ {{- if .ImageConfig.Image.Location}}
16
+ location : {{.ImageConfig.Image.Location}}
17
+ {{- end}}
18
+ {{- if .ImageConfig.HealthCheck}}
19
+ healthcheck :
20
+ # Container health checks
21
+ command : {{fmtSlice (quoteSlice .ImageConfig.HealthCheck.Command)}}
22
+ interval : {{.ImageConfig.HealthCheck.Interval}}
23
+ retries : {{.ImageConfig.HealthCheck.Retries}}
24
+ timeout : {{.ImageConfig.HealthCheck.Timeout}}
25
+ start_period : {{.ImageConfig.HealthCheck.StartPeriod}}
26
+ {{- end}}
27
+
28
+ cpu : {{.CPU}} # Number of CPU units for the task.
29
+ memory : {{.Memory}} # Amount of memory in MiB used by the task.
30
+ count : {{.Count.Value}} # Number of tasks that should be running in your service.
31
+ exec : true # Enable running commands in your container.
32
+
33
+ {{- if .Subscribe}}{{- if .Subscribe.Topics}}
34
+ subscribe :
35
+ topics :
36
+ {{- range $topic := .Subscribe.Topics}}
37
+ - name : {{.Name}}
38
+ service : {{.Service}}
39
+ {{- end}}
40
+ {{- end}}{{- end}}
41
+
42
+ # Optional fields for more advanced use-cases.
43
+ #
44
+ # variables: # Pass environment variables as key value pairs.
45
+ # LOG_LEVEL: info
46
+
47
+ # secrets: # Pass secrets from AWS Systems Manager (SSM) Parameter Store.
48
+ # GITHUB_TOKEN: GITHUB_TOKEN # The key is the name of the environment variable, the value is the name of the SSM parameter.
49
+
50
+ # You can override any of the values defined above by environment.
51
+ # environments:
52
+ # test:
53
+ # count: 2 # Number of tasks to run for the "test" environment.
54
+
55
+ # You can enable self-publishing or publishing to other services.
56
+ # publish:
57
+ # topics:
58
+ # - name: {{.Name}}Topic
59
+ # allowed_workers:
60
+ # - {{.Name}}
0 commit comments