From 1840426f793aa820decb3f43d0786acdfcc44af5 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Sun, 2 Jul 2023 15:04:33 +0100 Subject: [PATCH] maybe fix config --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 447460a..4c602f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,10 @@ FROM node:lts-alpine ENV NODE_ENV=production WORKDIR /usr/src/app -COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] +COPY ["config.json", "package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"] RUN npm install --production --silent && mv node_modules ../ COPY . . EXPOSE 3000 -RUN chown -R node /usr/src/app -USER node # Opt out of NextJS telemetry RUN npx next telemetry disable @@ -14,4 +12,8 @@ RUN npx next telemetry disable # Build the app RUN npm run build +# Setup permissions +RUN chown -R node /usr/src/app +USER node + CMD ["npm", "start"]