diff --git a/Dockerfile b/Dockerfile index 2345286..3abbf86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,7 @@ -# first stage builds vue -FROM node:16 as build-stage -WORKDIR /build -COPY . . -RUN npm install -RUN npm run build +FROM node:lts-alpine -# second stage copies the static dist files and Node server files -FROM node:16 as production-stage WORKDIR /app -COPY package.json vueBaseAppServer.js ./ -COPY --from=build-stage /build/dist/ dist/ -RUN npm install --omit=dev -RUN rm -rf build +COPY . ./ +RUN npm install -# open port 3000 and run Node server -EXPOSE 3000 -CMD [ "node", "main.js" ] \ No newline at end of file +CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"] \ No newline at end of file