Hi, I do #devops at https://unee-t.com/ which uses Meteor for the frontend.
I did notice Docker, Meteor, and AWS ECS - #21 by khamoud but the tutorial seems to be dead. Hence I thought I would quickly share and invite critique of the way I am currently doing it.
-
frontend/.travis.yml at master · unee-t/frontend · GitHub is used for
npm t
- frontend/buildspec.yml at master · unee-t/frontend · GitHub is used for building the frontend/Dockerfile at master · unee-t/frontend · GitHub and putting the image upon Docker
I must thank Seán C. McCord for the starting point: Meteor Dockerfile
- Deployment is happening via AWS CodePipeline.
It’s a little tricky because our Meteor seems to require the CloudFront to be invalidated (not sure what’s the story with cache busting). And that’s done via GitHub - unee-t/invalidate: CodePipeline lambda function to invalidate a CloudFront distribution based on user parameters
Setting up the CodePipeline is done by hand in 3 accounts (dev, demo, prod) and it’s easy to tick and choose some wrong option. i.e. this is pain.
You may have noticed that our TravisCI file is/was doing deployments, but that’s deprecated because
- ecs-cli is kindof deprecated
- ulexus/meteor:build is deprecated
- permissions becomes a little saner. i.e. powerful permissions are not stored as env variables on travis, they are kept within the AWS ecosystem
In future I might move to a CDK based script style deployment and ditch CodePipeline. aws-cdk-examples/typescript/ecs at master · aws-samples/aws-cdk-examples · GitHub