-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Typescript Support & KS Workflow (#49)
- Loading branch information
1 parent
a3d5eef
commit 403d0cc
Showing
30 changed files
with
14,980 additions
and
16,136 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
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
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,44 @@ | ||
# Build in a full featured container | ||
FROM node:20-bullseye as build | ||
|
||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive \ | ||
apt-get install --no-install-recommends --assume-yes \ | ||
protobuf-compiler=3.12.4-1+deb11u1 libprotobuf-dev=3.12.4-1+deb11u1 | ||
|
||
# Get go compiler | ||
ARG PLATFORM=amd64 | ||
RUN wget -q https://go.dev/dl/go1.20.4.linux-${PLATFORM}.tar.gz \ | ||
&& tar -C /usr/local -xzf go1.20.4.linux-${PLATFORM}.tar.gz | ||
|
||
WORKDIR /app | ||
|
||
# Copy CLI build dependencies | ||
COPY cmd ./cmd | ||
COPY loadgen ./loadgen | ||
COPY scenarios ./scenarios | ||
COPY workers ./workers | ||
COPY go.mod go.sum ./ | ||
|
||
# Build the CLI | ||
RUN CGO_ENABLED=0 /usr/local/go/bin/go build -o temporal-omes ./cmd | ||
|
||
ARG SDK_VERSION | ||
|
||
# Optional SDK dir to copy, defaults to unimportant file | ||
ARG SDK_DIR=.gitignore | ||
COPY ${SDK_DIR} ./repo | ||
|
||
# Build the worker | ||
RUN CGO_ENABLED=0 ./temporal-omes prepare-worker --language ts --dir-name prepared --version "$SDK_VERSION" | ||
|
||
# Copy the CLI and prepared feature to a "run" container. | ||
FROM gcr.io/distroless/nodejs20-debian11 | ||
|
||
COPY --from=build /app/temporal-omes /app/temporal-omes | ||
COPY --from=build /app/workers/typescript /app/workers/typescript | ||
|
||
# Node is installed here 👇 in distroless | ||
ENV PATH="/nodejs/bin:$PATH" | ||
# Use entrypoint instead of command to "bake" the default command options | ||
ENTRYPOINT ["/app/temporal-omes", "run-worker", "--language", "typescript", "--dir-name", "prepared"] |
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.