16 lines
461 B
Docker
16 lines
461 B
Docker
# build stage
|
|
FROM node:18-alpine3.19 AS build-stage
|
|
# Set environment variables for non-interactive npm installs
|
|
ENV NPM_CONFIG_LOGLEVEL warn
|
|
WORKDIR /app
|
|
COPY . .
|
|
COPY .env.example .env.development
|
|
RUN npm install -g pnpm && pnpm i
|
|
RUN pnpm build
|
|
|
|
# production stage
|
|
FROM nginx:stable-alpine AS production-stage
|
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"] |