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:
15
frontend/Dockerfile
Normal file
15
frontend/Dockerfile
Normal 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"]
|
||||
|
||||
Reference in New Issue
Block a user