# The manifest for the "fe" service. # Read the full specification for the "Load Balanced Web Service" type at: # https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/ # Your service name will be used in naming your resources like log groups, ECS services, etc. name: fe # The "architecture" of the service you're running. type: Load Balanced Web Service image: build: ./Dockerfile # Port exposed through your container to route traffic to it. port: 4000 http: # Requests to this path will be forwarded to your service. # To match all requests you can use the "/" path. path: '/' alias: example.com # You can specify a custom health check path. The default is "/". # For additional configuration: https://aws.github.io/copilot-cli/docs/manifest/lb-web-service/#http-healthcheck # healthcheck: '/' # You can enable sticky sessions. # stickiness: true # 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: range: 2-10 cpu_percentage: value: 70 cooldown: out: 2m30s storage: volumes: persistence: path: /etc/scratch publish: topics: - name: givesdogs - name: mytopic fifo: true # 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. # You can override any of the values defined above by environment. environments: test: network: vpc: security_groups: - sg-0c10c4fe23f5e5361 - sg-09295097b2a41b59d - from_cfn: MyUserDBAccessSecurityGroup1 - from_cfn: MyUserDBAccessSecurityGroup2 staging: image: location: 123456789000.dkr.ecr.us-east-1.amazonaws.com/vault/e2e:${TAG} count: spot: 5 http: hosted_zone: mockHostedZone healthcheck: path: / grace_period: 30s deregistration_delay: 30s additional_rules: - path: "admin" alias: "example.com" target_port: 4001 prod: deployment: rollback_alarms: cpu_utilization: 70 count: range: min: 3 max: 12 spot_from: 6 cooldown: in: 30s out: 1m30s variables: DB_NAME: from_cfn: MyDB secrets: SQL_PASS: SQL_PASS GIT_USERNAME: from_cfn: stack-SSMGHUserName DB: secretsmanager: 'demo/testing/mysql' logging: retention: 1 destination: Name: cloudwatch region: us-west-2 log_group_name: /copilot/sidecar-test-hello log_stream_prefix: copilot/ variables: TEST: TEST DB_NAME: from_cfn: MyDB env_file: ./logging.env secrets: GITHUB_TOKEN: GITHUB_TOKEN MONGO_DB: from_cfn: stack-MongoUserName secretOptions: SQL_USERNAME: SQL_USERNAME GIT_USERNAME: from_cfn: stack-SSMGHUserName DB: secretsmanager: 'demo/testing/mysql' http: path: '/' alias: example.com target_container: nginx additional_rules: - path: "admin" target_container: nginx target_port: 8081 alias: example.com - path: "superadmin" target_port: 4000 alias: example.com network: connect: alias: api sidecars: nginx: port: 8080 image: 1234567890.dkr.ecr.us-west-2.amazonaws.com/reverse-proxy:revision_1 variables: NGINX_PORT: 80 DB_NAME: from_cfn: MyDB healthcheck: command: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"] interval: 10s secrets: SQL_PASS: SQL_PASS GIT_USERNAME: from_cfn: stack-SSMGHUserName DB: secretsmanager: 'demo/testing/mysql' operation: image: "alpine:latest" command: ["echo", "$COPILOT_APPLICATION_NAME"]