|
|
@ -0,0 +1,25 @@ |
|
|
|
# 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"] |