Repo for https://ethanhassett.com
- Follow conventional commits v1.0.0 for commits and PR titles.
- For IaC changes, follow the Terraform best practices as close as possible.
- Follow GitHub Flow for branching strategy and PR process.
- Make sure any app code changes also include a version bump, following Semantic Versioning.
Make sure you're using the versions in the .tool-versions
files in both app and infrastructure.
The deployment process follows GitHub Flow.
When code is merged to main
:
- Any changes to the app will trigger a new tag and release based off of the version in
package.json
. - A Docker image is created with the new version.
- Infrastructure changes are deployed via Spacelift.
To test changes to the application with Astro only:
- Run
cd app && npm run dev
. - Navigate to
localhost:4321
in your browser. - Verify things are running properly and there are no Astro warnings.
To test changes with Docker:
- Build the Docker image locally by running
docker build --tag ethanhassett:test .
. - Run the container with:
docker run --detach \
--name ethanhassett.com \
--publish 80:4321 \
ethanhassett:test
- Navigate to
localhost
in your browser. - Verify things are running properly.
- (Optional) Stop the container and cleanup with:
docker stop ethanhassett.com && \
docker container rm ethanhassett.com && \
docker image rm ethanhassett:test