-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support server url env vars and enum
- Loading branch information
Showing
10 changed files
with
154 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.hasura-connector/ | ||
*.hml | ||
.github/ | ||
assets/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,3 @@ | ||
# build context at repo root: docker build -f Dockerfile . | ||
FROM golang:1.22 AS builder | ||
FROM ghcr.io/hasura/ndc-rest:${VERSION} | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN CGO_ENABLED=0 go build -v -o ndc-cli . | ||
|
||
# stage 2: production image | ||
FROM gcr.io/distroless/base-debian12:nonroot | ||
|
||
# Copy the binary to the production image from the builder stage. | ||
COPY --from=builder /app/ndc-cli /ndc-cli | ||
|
||
ENV HASURA_CONFIGURATION_DIRECTORY /config | ||
|
||
# Run the web service on container startup. | ||
CMD ["/ndc-cli", "serve"] | ||
COPY ./config /config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# build context at repo root: docker build -f Dockerfile . | ||
FROM golang:1.22 AS builder | ||
|
||
WORKDIR /app | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY . . | ||
RUN CGO_ENABLED=0 go build -v -o ndc-cli . | ||
|
||
# stage 2: production image | ||
FROM gcr.io/distroless/static-debian12:nonroot | ||
|
||
# Copy the binary to the production image from the builder stage. | ||
COPY --from=builder /app/ndc-cli /ndc-cli | ||
|
||
ENV HASURA_CONFIGURATION_DIRECTORY /config | ||
|
||
# Run the web service on container startup. | ||
CMD ["/ndc-cli", "serve"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.