joshprzybyszewski / cribbage

A cribbage scorer and game
MIT License
2 stars 1 forks source link

Deploy server to ecs #94

Open cszczepaniak opened 3 years ago

cszczepaniak commented 3 years ago

STILL TODO IN THIS PR

What broke / What you're adding

Deploying the application to AWS using aws cdk. This is a nifty tool that I found out about through work; it's an infrastructure-as-code platform that allows us to easily provision AWS resources. Out of the box, it comes with a lot of neat libraries that abstract away significant amounts of infrastructure boilerplate (you can see here that I'm getting something running out in ECS fronted by a load balancer in ~10 lines of TypeScript).

How you did it

Mostly followed the CDK documentation. awscdk.io is a decent resource; here's the main link I was working with. This video was not super helpful but helped me realize I need to specify which port the docker image is serving on.

Here's a promising article about setting up the DB within the VPC, although their use case was a bit different since they were using lambdas and stuff.

How to test it and how to try to break it

Well, we really want the github actions to be deploying it. But if you wanna try it on your own...

codecov[bot] commented 3 years ago

Codecov Report

Merging #94 (c71e526) into master (978c0c6) will decrease coverage by 0.12%. The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   70.52%   70.39%   -0.12%     
==========================================
  Files          86       86              
  Lines        3948     3955       +7     
==========================================
  Hits         2784     2784              
- Misses        893      899       +6     
- Partials      271      272       +1     
Impacted Files Coverage Δ
server/setup.go 0.00% <0.00%> (ø)
server/persistence/mysql/mysql.go 77.08% <100.00%> (+1.00%) :arrow_up:
server/play/cut.go 44.12% <0.00%> (-5.88%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 978c0c6...c71e526. Read the comment docs.

cszczepaniak commented 3 years ago

go.mod should handle things relative to the folder it's in, no?

cszczepaniak commented 3 years ago

would be easy to revert the folder structure too if it's an issue