adding Dockerfile 2, electric boogaloo

This commit is contained in:
2022-12-18 18:32:37 -03:00
parent 19586b1575
commit 9408d2efb7
5 changed files with 28 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
FROM alpine:latest
FROM alpine:latest as build
RUN apk add --update nodejs npm
RUN npm install --global yarn
@@ -8,7 +8,10 @@ COPY [".", "/usr/src"]
WORKDIR "/usr/src"
RUN yarn
RUN yarn build
EXPOSE 3000
CMD ["yarn", "start"]
FROM nginx:1.23.1-alpine
EXPOSE 80
COPY ./docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /usr/src/build /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]