added deploying a docker image to docker hub

This commit is contained in:
Wenszel
2023-12-20 18:21:45 +01:00
parent e5a69fa4a9
commit 766614f5d2
13 changed files with 113 additions and 18 deletions
+19
View File
@@ -0,0 +1,19 @@
FROM node:14 as frontend
WORKDIR /app
COPY . /app
RUN npm install --production
RUN npm run build
FROM node:14 as backend
WORKDIR /app
COPY /backend /app
RUN npm install
FROM node:14
WORKDIR /app
COPY --from=backend /app /app/
COPY --from=frontend /app/build /app/build
EXPOSE 8080
CMD ["npm", "run", "start"]