diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d448282 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +# NodeJs +node_modules/ +.git/ +.nuxt/ +.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5225ebb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM node:18-alpine AS build + +WORKDIR /app + +COPY package*.json /app + +RUN npm install + +COPY . /app + +RUN npm run build + +FROM node:18-alpine AS prod + +WORKDIR /app + +COPY --from=build /app/.output /app/.output + +ENV NUXT_HOST=0.0.0.0 +ENV NUXT_PORT=3000 + +EXPOSE 3000 + +CMD ["node", ".output/server/index.mjs"] \ No newline at end of file