From 2533e36139c30817877f5b00d40c433561f36f31 Mon Sep 17 00:00:00 2001 From: lulu Date: Fri, 29 Sep 2023 18:23:42 +0200 Subject: [PATCH 1/2] fix(docker-image): copy assets --- dockerfiles/Dockerfile.prod | 1 + dockerfiles/Dockerfile.test | 1 + package.json | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dockerfiles/Dockerfile.prod b/dockerfiles/Dockerfile.prod index 93554c4..cdec9a8 100644 --- a/dockerfiles/Dockerfile.prod +++ b/dockerfiles/Dockerfile.prod @@ -26,5 +26,6 @@ WORKDIR /home/node COPY --chown=node:node --from=builder /home/node/package*.json /home/node/ COPY --chown=node:node --from=builder /home/node/node_modules/ /home/node/node_modules/ COPY --chown=node:node --from=builder /home/node/dist/ /home/node/dist/ +COPY --chown=node:node --from=builder /home/node/src/assets/ /home/node/src/assets/ CMD ["node", "dist/main"] diff --git a/dockerfiles/Dockerfile.test b/dockerfiles/Dockerfile.test index 6e8bb8e..b446125 100644 --- a/dockerfiles/Dockerfile.test +++ b/dockerfiles/Dockerfile.test @@ -12,5 +12,6 @@ RUN npm ci COPY ./src /home/node/src COPY ./tsconfig.json /home/node/tsconfig.json COPY ./.prettierrc.json /home/node/.prettierrc.json +COPY --chown=node:node --from=builder /home/node/src/assets/ /home/node/src/assets/ ENTRYPOINT [""] diff --git a/package.json b/package.json index c254bd7..cce75fd 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "start": "nest start", "tunnel": "ngrok http 3000", "start:debug": "nest start --debug --watch", - "build:prod": "docker build --pull --rm -f \"dockerfiles\\Dockerfile.prod\" -t bingusboingus:latest \".\"", - "build:test": "docker build --pull --rm -f \"dockerfiles\\Dockerfile.test\" -t bingusboingus:test \".\"", + "build:prod": "docker build --pull --rm -f \"dockerfiles\\Dockerfile.prod\" -t ghcr.io/blvckleg/bingusboingus:latest \".\"", + "build:test": "docker build --pull --rm -f \"dockerfiles\\Dockerfile.test\" -t ghcr.io/blvckleg/bingusboingus:test \".\"", "test:image": "docker run bingusboingus:test npm run test", "test": "jest", "test:watch": "jest --watch" From 3f541bd451c4c08fd9af23f0f9bd25ab4765844a Mon Sep 17 00:00:00 2001 From: lulu Date: Fri, 29 Sep 2023 18:25:54 +0200 Subject: [PATCH 2/2] fix: did some stupid shit --- dockerfiles/Dockerfile.test | 1 - 1 file changed, 1 deletion(-) diff --git a/dockerfiles/Dockerfile.test b/dockerfiles/Dockerfile.test index b446125..6e8bb8e 100644 --- a/dockerfiles/Dockerfile.test +++ b/dockerfiles/Dockerfile.test @@ -12,6 +12,5 @@ RUN npm ci COPY ./src /home/node/src COPY ./tsconfig.json /home/node/tsconfig.json COPY ./.prettierrc.json /home/node/.prettierrc.json -COPY --chown=node:node --from=builder /home/node/src/assets/ /home/node/src/assets/ ENTRYPOINT [""]