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.
27 lines
426 B
27 lines
426 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
|
|
|
|
|
|
# Setup the server
|
|
|
|
FROM node:lts-slim
|
|
|
|
WORKDIR /usr/app/
|
|
COPY --from=client /usr/app/client/build/ ./client/build/
|
|
|
|
WORKDIR /usr/app/server/
|
|
COPY server/package*.json ./
|
|
RUN npm install -qy
|
|
COPY server/ ./
|
|
|
|
ENV PORT 8000
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["npm", "start"]
|