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
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -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", ""]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user