You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

25 lines
488 B

# Set up and build the client
FROM node:lts-slim as client
WORKDIR /usr/app/client/
COPY client/package*.json ./
RUN npm install -qy
COPY client/ ./
RUN npm run build
# Copy build dir to maintain the current production version local
FROM node:lts-slim
WORKDIR /usr/app
COPY --from=client /usr/app/client/dist/ ./client/dist/
# Set up the server
WORKDIR /usr/app/server/
COPY server/package*.json ./
RUN npm install -qy
COPY server/ ./
ENV PORT 8000
EXPOSE 8000
CMD ["npm", "start"]