This repository provides boilerplate for deploying a simple Node.js application to AWS Fargate.
NOTE
This repository should never be used directly, the "Use this template" button should always be utilized to create fork of this repository.
- Version-Specific Documentation
- Project CI/CD Versions
- Design Goals/Highlights
- Frequently Asked Questions (F.A.Q.)
- License
- Version One (v1) README: Documentation for the main version that uses the current base infrastructure. Go to this README if you are looking for quick-start instructions.
- Version One: This version of the boilerplate works with the standard base infrastructure.
- The standard base infrastructure is located here: boilerplate-aws-account-setup
- This version uses manual approval steps to move the current artifacts through the flow.
- This version is the current active version and the one folks should typically use.
- Control when infrastructure or application changes are deployed using configuration files.
- Use a flavor of trunk-based development: https://trunkbaseddevelopment.com/
- Make use of the GitHub API to help manage patch level revisions.
- Create formal releases in GitHub using the GitHub API.
- Minimize the number of GitHub webhooks needed.
- Create an "orchestrator" to control the retrieval of all source files and distribute them where needed.
- Allow for deployment to one or two regions.
- Simplify the creation and management of AWS resources.
- Make use of Secrets Manager for ECS/Fargate secrets.
- Make managing of ECS/Fargate environment variables easier.
- Make load balancers optional for services.
- Take advantage of the latest CodeBuild/CodePipeline features.
- Create working examples of application and infrastructure testing.
- Do some clean-up of the Node.js example service.
- Encourage the use of "Conventional Commits" to help make commit message more meaningful: https://www.conventionalcommits.org/
- Separation of duties, using different CodePipelines for different purposes to make things more modular and easier to maintain.
- Create a helper script to make initial setup easier.
- Think about how to manage versions from the start (to make things easier to maintain in the future).
- This
README.md
file has no information on how to get started, where do I start?- The detailed documentation for getting started is in the
README.md
for a specific version, so forv1
, you would go here.
- The detailed documentation for getting started is in the
- Why is most of the content in a
v1
folder?- The idea is that you can have multiple major versions of your application in one repository. Perhaps the first version used Node.js and CloudFormation, and now the second version uses Python and Terraform, they can both live in this repository under different base folders.
- Each version of the product should have the ability to filter out files during the build process. For instance, in
v1
, you can filter out thev2
files by using the orchestrator list files. - You could also rename
v1
to something likecurrent
, and then you would eventually have folders such asprevious
,current
, andnext
. So you could support aprevious
version for a short period of time, have thecurrent
active version, but also start developing thenext
version, all in the same repository.
- Is the
v1
folder required?- No, you can choose to exclude the version folder and things should generally work.
- NOTE: Changes are always tested with the
v1
folder in place, so it is possible that there are bugs when trying to remove this folder level, please report the bugs if you find them.
- Can I use this boilerplate directly?
- No, you should always fork this repository into your own repository.
- You always work from a copy of this boilerplate, not the original repository.
- This repository is set up to be used as a repository template. Click the "Use this template" button on the main page of the repository to make your own, project-specific copy.
- This boilerplate is missing functionality, has broken functionality, or I don't like how something works, what do I do?
- This boilerplate is intended to be a solid starting point for your project. Since you will be making your own copy of this repository, you can make any changes/enhancements you need to your copy (in order to meet the requirements of your project).
- If there is missing or broken functionality, please feel free to put in a pull request with the bug fix or enhancement.
- If you don't like how something works, contact one of the current maintainers to discuss your suggested changes, or put in a pull request with the suggested changes.
- NOTE: Please do not merge in any pull requests to this repository without review from one of the project maintainers.
This repository is released under the MIT license. View the local license file.