Skip to content

Commit

Permalink
feat: add healthcheck (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrunton authored Sep 8, 2024
1 parent 50b8a7a commit aa443db
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
publish: true
docker-username: jbrunton
cache-image: jbrunton/chat-demo-api-cache-image:latest
run-image: jbrunton/run-google-22
secrets:
docker-access-token: ${{ secrets.DOCKER_ACCESS_TOKEN }}

Expand Down Expand Up @@ -106,3 +107,4 @@ jobs:
service: ${{ steps.pulumi-outputs.outputs.service }}
cluster: ${{ steps.pulumi-outputs.outputs.cluster }}
wait-for-service-stability: true
wait-for-task-stopped: true
7 changes: 7 additions & 0 deletions pulumi/app/aws/get-app-spec.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ describe("getTaskDefinitionSpec", () => {
protocol: "tcp",
},
],
healthCheck: {
retries: 3,
command: ["CMD-SHELL", "curl -f http://localhost:8080/ || exit 1"],
timeout: 5,
interval: 30,
startPeriod: 5,
},
environment: [
{
name: "PORT",
Expand Down
7 changes: 7 additions & 0 deletions pulumi/app/aws/get-app-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ export const getTaskDefinitionSpec = ({
protocol: "tcp",
},
],
healthCheck: {
retries: 3,
command: ["CMD-SHELL", "curl -f http://localhost:8080/ || exit 1"],
timeout: 5,
interval: 30,
startPeriod: 5,
},
environment: [
{
name: "PORT",
Expand Down
2 changes: 1 addition & 1 deletion pulumi/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "infrastructure",
"name": "pulumi",
"main": "index.ts",
"engines": {
"node": "20.x"
Expand Down

0 comments on commit aa443db

Please sign in to comment.