tjo.space/Dockerfile

19 lines
456 B
Text
Raw Normal View History

2023-09-10 18:24:56 +00:00
FROM node:lts as build
# Reduce npm log spam and colour during install within Docker
ENV NPM_CONFIG_LOGLEVEL=warn
ENV NPM_CONFIG_COLOR=false
WORKDIR /home/node/app
COPY --chown=node:node . /home/node/app/
RUN npm install
RUN npm run typecheck
RUN npm run build
FROM nginx:stable as production
WORKDIR /home/node/app
# Copy what we've installed/built from production
COPY --chown=nobody:nogroup --from=build /home/node/app/build /usr/share/nginx/html/