Skip to content

Commit a93ab63

Browse files
Add Docker healthcheck and add node_modules to the .dockerignore (#22)
1 parent 185635e commit a93ab63

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Changes to be included in the next upcoming release
1010
- Improved error messages when unsupported enum types or unions of literal types are found, and allow these types to be used in relaxed types mode ([#17](https://github.com/hasura/ndc-nodejs-lambda/pull/17))
1111
- Improved naming of types that reside outside of the main `functions.ts` file. Type names will now only be prefixed with a disambiguator if there is a naming conflict detected (ie. where two different types use the same name). Anonymous types are now also named in a shorter way. ([#21](https://github.com/hasura/ndc-nodejs-lambda/pull/21))
1212
- Updated NodeJS to v20 and TypeScript to v5.4.2 ([#23](https://github.com/hasura/ndc-nodejs-lambda/pull/23))
13+
- Added a built-in Docker healthcheck, and ignored `node_modules` from the Docker build ([#22](https://github.com/hasura/ndc-nodejs-lambda/pull/22))
1314

1415
## [1.1.0] - 2024-02-26
1516
- Updated to [NDC TypeScript SDK v4.2.0](https://github.com/hasura/ndc-sdk-typescript/releases/tag/v4.2.0) to include OpenTelemetry improvements. Traced spans should now appear in the Hasura Console

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM node:20-alpine
22

3-
RUN apk add jq
3+
RUN apk add jq curl
44

55
COPY /docker /scripts
66

@@ -9,4 +9,6 @@ RUN /scripts/package-restore.sh
99

1010
EXPOSE 8080
1111

12+
HEALTHCHECK --interval=5s --timeout=10s --start-period=1s --retries=3 CMD [ "sh", "-c", "exec curl -f http://localhost:${HASURA_CONNECTOR_PORT:-8080}/health" ]
13+
1214
CMD [ "sh", "/scripts/start.sh" ]

connector-definition/.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.hasura-connector/
22
*.hml
3+
node_modules/

0 commit comments

Comments
 (0)