First version of the dockerfiles, following the principle of single responisbility, server and client get a Dockerfile each that can latter be used in a docker compose

This commit is contained in:
Murilo Ghignatti 2023-04-26 12:03:40 -03:00
parent 8f878be720
commit ad9b2e6aa5
2 changed files with 21 additions and 0 deletions

9
client/Dockerfile Normal file
View file

@ -0,0 +1,9 @@
FROM node:current-alpine
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
EXPOSE 80
CMD [ "npm", "run", "build" ]

12
server/Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM node:current-alpine
WORKDIR /server
COPY package*.json ./
RUN npm install --legacy-peer-deps
COPY . .
RUN npm run build
EXPOSE 8080
CMD [ "node", "build/server.js" ]