copilot-example-voting-app / results

Frontend service to visualize the results of the votes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

results

Frontend service to visualize the results of the votes.
results

The "results" service illustrates how you can have multiple services share the same load balancer. The "vote" service listens on "/" whereas "results" listens on "/results". AWS Copilot handles creating multiple listener rules for you and assigning them a priority.

How to create this service?

  1. Install the AWS Copilot CLI https://aws.github.io/copilot-cli/
  2. Run
    $ copilot init
  3. Enter "voting-app" for the name of your application.
  4. Select "Load Balanced Web Service" for the service type.
  5. Enter "results" for the name of the service.
  6. Say "Y" to deploying to a "test" environment πŸš€

Once deployed, your service will be accessible at an HTTP endpoint provided by the CLI like: http://votin-publi-anelun2kxbrl-XXXXXXX.YYYYY.elb.amazonaws.com/results

What does it do?

AWS Copilot uses AWS CloudFormation under the hood to provision your infrastructure resources. You should be able to see a voting-app-test-results stack that yours ECS service along with all the peripheral resources needed for logging, service discovery, and more...

How does it work?

Copilot stores the infrastructure-as-code for your service under the copilot/ directory.

copilot
└── results
    └── manifest.yml

The manifest.yml file under results/ holds the common configuration for a "load balanced web service" pattern. The difference between the manifest in the "vote" service and "results" is the http.path field.

Deleting the service

If you'd like to delete only the service from the "voting-app" application.

$ copilot svc delete

If you'd like to delete the entire application including other services and deployment environments:

$ copilot app delete

About

Frontend service to visualize the results of the votes

License:Apache License 2.0


Languages

Language:HTML 72.4%Language:Go 24.8%Language:Dockerfile 2.1%Language:Makefile 0.7%