mirror of
https://github.com/fccapria/scientify.git
synced 2026-01-12 02:36:10 +00:00
28 lines
461 B
Docker
28 lines
461 B
Docker
# Build stage
|
|
FROM node:18-alpine as build
|
|
|
|
WORKDIR /app
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
|
|
RUN pnpm install --frozen-lockfile
|
|
|
|
COPY . .
|
|
|
|
ENV GENERATE_SOURCEMAP=false
|
|
ENV ESLINT_NO_DEV_ERRORS=true
|
|
ENV DISABLE_ESLINT_PLUGIN=true
|
|
RUN pnpm run build
|
|
|
|
# Production stage
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=build /app/build /usr/share/nginx/html
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|