diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..6e75f15 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +node_modules/ +.vscode/ +.git/ +.gitignore \ No newline at end of file diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..34d5fb0 --- /dev/null +++ b/Containerfile @@ -0,0 +1,18 @@ +FROM docker.io/node:23-alpine3.19 +EXPOSE 8080 + +ARG NODE_ENV=production +ENV NODE_ENV $NODE_ENV + +WORKDIR /app +RUN chown node:node ./ + +USER node + +COPY package.json package-lock.json* ./ +RUN npm ci && npm cache clean --force + +COPY *.js ./ +COPY frontend/ frontend/ + +CMD ["node", "./backend.js"] \ No newline at end of file