Skip to content
Snippets Groups Projects
Commit 3fd7e6e3 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

Docker

parent ec37fc00
No related branches found
No related tags found
No related merge requests found
Pipeline #20695 passed
# Exclude all...
*
# ...except essential
!/public
!/src
!package*.json
# --------------> The build image
FROM node:18.12.1 AS builder
ARG NPM_TOKEN
WORKDIR /app
COPY package*.json ./
RUN echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc && \
npm ci --only=production && \
rm -f .npmrc
COPY . .
RUN npm run build
# --------------> The production image
FROM nginx:1.23.3-alpine as production
ENV NODE_ENV production
# Copy built assets from `builder` image
COPY --from=builder /app/build/ /usr/share/nginx/html/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment