diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..651665b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +.git diff --git a/Dockerfile b/Dockerfile index c05f8ee..be3cc78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV VITE_BASE_URL=${VITE_BASE_URL} COPY package*.json / -RUN npm ci +RUN npm install COPY . . @@ -18,6 +18,8 @@ COPY . . FROM base AS dev +ENV NODE_ENV=development + EXPOSE 4000 CMD ["npm", "run", "dev"] @@ -26,6 +28,8 @@ CMD ["npm", "run", "dev"] FROM base AS production +ENV NODE_ENV=production + WORKDIR /backoffice RUN npm run build