Skip to content

Commit

Permalink
Fixs Bug #1
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashochguertel committed Aug 7, 2023
1 parent 84eb6a7 commit b7ac09e
Show file tree
Hide file tree
Showing 6 changed files with 167 additions and 344 deletions.
Binary file added .DS_Store
Binary file not shown.
25 changes: 15 additions & 10 deletions Dockerfile
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"]
15 changes: 7 additions & 8 deletions build.sh
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 \
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helm-template-service",
"version": "1.0.1",
"version": "1.0.2",
"author": "",
"description": "",
"license": "ISC",
Expand All @@ -10,7 +10,6 @@
},
"dependencies": {
"body-parser": "^1.20.2",
"concurrently": "^8.0.1",
"connect": "^3.7.0",
"cors": "^2.8.5",
"dotenv": "^16.0.3",
Expand All @@ -34,7 +33,6 @@
"@types/yamljs": "^0.2.31",
"@typescript-eslint/eslint-plugin": "^5.59.1",
"@typescript-eslint/parser": "^5.59.1",
"concurrently": "^8.0.1",
"nodemon": "^2.0.22",
"typescript": "^5.0.4"
},
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import express, { Express } from 'express';
import dotenv from 'dotenv';
import bodyParser from 'body-parser';
import { exec } from "child_process";
import jsYaml from 'js-yaml';
// import jsYaml from 'js-yaml';
import fs from 'fs';
const jsYaml = require('js-yaml');


dotenv.config();
Expand Down
Loading

0 comments on commit b7ac09e

Please sign in to comment.