diff --git a/Dockerfile b/Dockerfile index 65e26bc5..7b273242 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ WORKDIR /opt/autoupdate COPY . /opt/autoupdate/ -RUN yarn install --frozen-lockfile && yarn run build +RUN yarn install --immutable --production=true && yarn run build FROM node:16-alpine as runner @@ -20,6 +20,7 @@ RUN apk add --update --no-cache ca-certificates \ WORKDIR /opt/autoupdate -COPY --from=builder /opt/autoupdate/dist/index.js /opt/autoupdate/index.js +COPY --from=builder /opt/autoupdate/dist /opt/autoupdate +COPY --from=builder /opt/autoupdate/node_modules /opt/autoupdate/node_modules -ENTRYPOINT [ "node", "/opt/autoupdate/index.js" ] +ENTRYPOINT [ "node", "/opt/autoupdate/bin/cli.js" ] diff --git a/package.json b/package.json index d54d1d94..1b70eaca 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "autoupdate-action": "bin/cli.js" }, "scripts": { - "build": "ncc build bin/cli.ts --out dist", + "build": "tsc bin/cli.ts --outDir dist", "lint": "eslint . && prettier --list-different bin/*.ts src/*.ts test/*.ts", "lint:fix": "eslint --fix .", "test": "jest", @@ -23,7 +23,6 @@ "@octokit/webhooks": "^9.12.0", "@octokit/webhooks-definitions": "^3.67.3", "@types/node": "^16.10.2", - "@vercel/ncc": "^0.28.6", "ttypescript": "^1.5.12", "typescript": "^4.4.2" }, diff --git a/tsconfig.json b/tsconfig.json index 6722974d..5bcd482a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,7 @@ { "transform": "ts-auto-mock/transformer", "cacheBetweenTests": false - }, + } ] }, "include": ["src/**/*"], diff --git a/yarn.lock b/yarn.lock index 044077cd..e1cf69c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -895,11 +895,6 @@ "@typescript-eslint/types" "4.31.2" eslint-visitor-keys "^2.0.0" -"@vercel/ncc@^0.28.6": - version "0.28.6" - resolved "https://registry.yarnpkg.com/@vercel/ncc/-/ncc-0.28.6.tgz#073c0ce8e0269210c0a9f180fb0bf949eecc20e0" - integrity sha512-t4BoSSuyK8BZaUE0gV18V6bkFs4st7baumtFGa50dv1tMu2GDBEBF8sUZaKBdKiL6DzJ2D2+XVCwYWWDcQOYdQ== - abab@^2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"