-
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.
- Loading branch information
1 parent
84eb6a7
commit b7ac09e
Showing
6 changed files
with
167 additions
and
344 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 |
---|---|---|
@@ -1,20 +1,25 @@ | ||
FROM node:19-alpine | ||
FROM node:19-alpine AS builder | ||
|
||
RUN apk add --no-cache helm | ||
WORKDIR /app | ||
|
||
# Setup a path for using local npm packages | ||
RUN mkdir -p /opt/node_modules | ||
|
||
COPY ./package.json /app | ||
COPY ./yarn.lock /app | ||
|
||
COPY ./package.json /app/package.json | ||
COPY ./yarn.lock /app/yarn.lock | ||
RUN yarn install | ||
|
||
COPY ./ /app | ||
|
||
RUN yarn run build | ||
|
||
FROM node:19-alpine AS runner | ||
ENV NODE_ENV=production | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /app/dist /app/dist | ||
COPY --from=builder /app/package.json /app/package.json | ||
COPY --from=builder /app/yarn.lock /app/yarn.lock | ||
RUN yarn install | ||
|
||
EXPOSE 3002 | ||
|
||
RUN apk add --no-cache helm | ||
|
||
CMD ["yarn", "run", "start"] |
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,14 +1,13 @@ | ||
#!/bin/bash | ||
# podman build --format docker --tag th-helm-playground-template . | ||
|
||
# docker build --tag docker.io/tobiashochguertel/th-helm-playground-template:1.0.1 . | ||
# docker tag docker.io/tobiashochguertel/th-helm-playground-template:1.0.1 docker.io/tobiashochguertel/th-helm-playground-template:latest | ||
ENV NODE_ENV=production | ||
yarn run build | ||
|
||
# docker push docker.io/tobiashochguertel/th-helm-playground-template:1.0.1 | ||
# docker push docker.io/tobiashochguertel/th-helm-playground-template:latest | ||
PACKAGE_VERSION=$(cat package.json | jq -r '.version') | ||
|
||
docker buildx build --push \ | ||
--platform linux/arm64/v8,linux/amd64 \ | ||
--tag docker.io/tobiashochguertel/th-helm-playground-template:1.0.1 \ | ||
--tag docker.io/tobiashochguertel/th-helm-playground-template:latest \ | ||
. | ||
--tag docker.io/tobiashochguertel/th-helm-playground-template:"$PACKAGE_VERSION" \ | ||
. | ||
|
||
# --tag docker.io/tobiashochguertel/th-helm-playground-template:latest \ |
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.