From dbb0906312b8fbd42538280a0de6918d51cd4dc5 Mon Sep 17 00:00:00 2001 From: 3nprob <3nprob@3nprob> Date: Fri, 8 Oct 2021 03:38:31 +0900 Subject: [PATCH] Copy assets as part of npm postbuild --- Dockerfile | 4 ---- package.json | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index b3c583e..2261041 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,6 @@ RUN npm run build FROM node:16-slim COPY --from=builder /app/dist/ /app/ -COPY --from=builder /app/package.json /app/ -COPY --from=builder /app/package-lock.json /app/ -COPY --from=builder /app/static/ /app/static/ -COPY --from=builder /app/templates/ /app/templates/ WORKDIR /app diff --git a/package.json b/package.json index 659e2c2..e59faf8 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "node dist/index.js", "build": "npx tsc", + "postbuild": "cp -a package.json package-lock.json templates static dist", "lint": "eslint -c .eslintrc --max-warnings 0 'src/**/*.ts'", "watch": "npx tsc --watch", "test": "npx mocha -r ts-node/register test/**/*.test.ts",