Add Dockerfile.dev for backend, migrate frontend image to "serve" and change both docker-compose.ymls
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-06-02 09:28:35 +02:00
parent 85677f08e2
commit ffb91bb380
7 changed files with 51 additions and 61 deletions

View File

@@ -1,15 +1,15 @@
FROM node:alpine as builder
WORKDIR '/app'
FROM node:14.3.0-alpine as builder
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY ./package.json ./
RUN yarn
COPY . .
RUN yarn build
FROM nginx:alpine
LABEL maintainer="Kevin Reis <contact@humenius.me>"
FROM node:14.3.0-alpine
WORKDIR /app
COPY --from=builder /app/build .
RUN yarn global add serve
COPY --from=builder /app/build /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
EXPOSE 5000
CMD ["serve", "-s", ""]

View File

@@ -1,10 +1,9 @@
FROM node:alpine
FROM node:14.3.0-alpine
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
WORKDIR '/app'
COPY package.json .
COPY package.json ./
RUN yarn
COPY . .
CMD ["yarn", "start"]