Skip to content

Commit

Permalink
[PLATFORM-1591]: Healthchecks (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaeIsBad authored Mar 11, 2024
1 parent a7ce5e6 commit 05107f5
Show file tree
Hide file tree
Showing 8 changed files with 998 additions and 467 deletions.
54 changes: 34 additions & 20 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ jobs:
- uses: actions/upload-artifact@v3
with:
name: localauth0-${{ matrix.arch }}
path: ./target/${{ matrix.arch }}/release/localauth0
path: |
./target/${{ matrix.arch }}/release/localauth0
build-web:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,20 +68,32 @@ jobs:

- name: Create container
run: |-
buildah manifest create "localauth0"
for arch in amd64 arm64; do
rust_arch="$([ "$arch" = "arm64" ] && echo aarch64 || echo x86_64)-unknown-linux-musl"
localauth0_binary="./localauth0-$rust_arch/localauth0"
chmod +x "$localauth0_binary"
ctr="$(buildah from --arch $arch scratch)"
buildah copy "$ctr" "$localauth0_binary" "/localauth0"
buildah copy "$ctr" ./web/ /web/dist
buildah config \
--env 'RUST_LOG=error,localauth0=info' \
--cmd '["/localauth0"]' \
"$ctr"
buildah commit --manifest "localauth0" "$ctr"
for base in scratch alpine; do
manifest="localauth0-$base"
if [[ "$base" == "scratch" ]]; then
manifest="localauth0"
fi
buildah manifest create "$manifest"
for arch in amd64 arm64; do
rust_arch="$([ "$arch" = "arm64" ] && echo aarch64 || echo x86_64)-unknown-linux-musl"
localauth0_binary="./localauth0-$rust_arch/localauth0"
chmod +x "$localauth0_binary"
ctr="$(buildah from --arch $arch $base)"
buildah copy "$ctr" "$localauth0_binary" "/localauth0"
buildah copy "$ctr" ./web/ /web/dist
buildah config \
--env 'RUST_LOG=error,localauth0=info' \
--cmd '["/localauth0"]' \
--healthcheck 'CMD /localauth0 healthcheck'
--healthcheck-interval 0.1s \
--healthcheck-timeout 2s \
--healthcheck-start-period 2s \
"$ctr"
buildah commit --manifest "$manifest" "$ctr"
done
done
- name: Configure AWS credentials
Expand All @@ -96,12 +109,13 @@ jobs:
mask-password: "true"
registry-type: public

- name: Push primaassicurazioni
- name: Push primaassicurazioni alpine
run: >-
buildah manifest push --all localauth0
"docker://public.ecr.aws/primaassicurazioni/localauth0:${{ inputs.tag_name || github.event.release.tag_name }}"
buildah manifest push --all localauth0-alpine
"docker://public.ecr.aws/primaassicurazioni/localauth0:${{ inputs.tag_name || github.event.release.tag_name }}-alpine"
"docker://public.ecr.aws/primaassicurazioni/localauth0:alpine"
- name: Push c6i9l4r6
- name: Push primaassicurazioni
run: >-
buildah manifest push --all localauth0
"docker://public.ecr.aws/c6i9l4r6/localauth0:${{ inputs.tag_name || github.event.release.tag_name }}"
"docker://public.ecr.aws/primaassicurazioni/localauth0:${{ inputs.tag_name || github.event.release.tag_name }}"
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

---

## [0.7.1] - 2024-03-11

### Added
- `healthcheck` subcommand to preform a healthcheck on the running localauth0 instance

---

## [0.7.0] - 2023-12-22

### Added
Expand Down Expand Up @@ -152,7 +159,9 @@ Note: images temporairly use the public.ecr.aws/c6i9l4r6/localauth0 registry.



[Unreleased]: https://github.com/primait/localauth0/compare/0.7.0...HEAD

[Unreleased]: https://github.com/primait/localauth0/compare/0.7.1...HEAD
[0.7.1]: https://github.com/primait/localauth0/compare/0.7.0...0.7.1
[0.7.0]: https://github.com/primait/localauth0/compare/0.6.2...0.7.0
[0.6.2]: https://github.com/primait/localauth0/compare/0.6.1...0.6.2
[0.6.1]: https://github.com/primait/localauth0/compare/0.6.0...0.6.1
Expand Down
Loading

0 comments on commit 05107f5

Please sign in to comment.