Made Dockerfile for FE, serve.js for express server, and docker-compose to run both FE and BE services

This commit was merged in pull request #15.
This commit is contained in:
2023-03-18 15:46:07 -04:00
parent 9b0b7b0ec7
commit cef00dac0e
3 changed files with 62 additions and 0 deletions

15
frontend/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM node:18.3.0-alpine AS builder
# Install all node dependencies separately so it's cached in docker build
COPY ./package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir /code && cp -a /tmp/node_modules /code/
# Copy all the source code
WORKDIR /code
COPY ./ /code
# Build the project
RUN ["npm", "run", "build"]
CMD ["node", "serve.js"]