feat: add Docker support with Dockerfile and docker-compose configuration
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
# BUILD
|
||||
FROM node:22-bookworm AS build
|
||||
WORKDIR /app
|
||||
|
||||
ARG NUXT_PUBLIC_API
|
||||
ENV NUXT_PUBLIC_API $NUXT_PUBLIC_API
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN yarn run build
|
||||
|
||||
# RUN
|
||||
FROM node:22-bookworm AS run
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install --production
|
||||
|
||||
COPY --from=build /app/.output/ ./
|
||||
|
||||
ENV PORT=80
|
||||
ENV HOST=0.0.0.0
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["node", "/app/server/index.mjs"]
|
||||
Reference in New Issue
Block a user