From 75216f7552837edfa4a91ae3d8f51ad3d7876ed1 Mon Sep 17 00:00:00 2001 From: socialmentions <10514522+marcbarry@users.noreply.github.com> Date: Mon, 12 Feb 2024 00:06:39 +0000 Subject: [PATCH] fix .dockerignore --- .dockerignore | 3 ++- Dockerfile | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4a641bf..c550351 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,5 @@ .env Dockerfile README.md -node_modules/ \ No newline at end of file +**/node_modules/ +**/.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ddbbfde..91bad87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,14 @@ FROM node:16-alpine # Set the working directory in the container WORKDIR /usr/src/app -# Copy the package.json and package-lock.json (if available) to the working directory -COPY src/ ./ +# Copy the package.json and package-lock.json +COPY src/package*.json ./ # Install any dependencies RUN npm install +# Copy application code +COPY src/ ./ + # Define the command to run your app using CMD which defines your runtime CMD ["npm", "start"]