dockerize

This commit is contained in:
Julian Krauser 2024-11-05 16:18:39 +01:00
parent 9535023a94
commit 38385d56d9
2 changed files with 29 additions and 0 deletions

5
.dockerignore Normal file
View file

@ -0,0 +1,5 @@
# NodeJs
node_modules/
.git/
.nuxt/
.env

24
Dockerfile Normal file
View file

@ -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"]