build: 🔨🚧 apply misc build tweaks

This commit is contained in:
Collin M. Barrett 2020-08-29 12:33:22 -05:00
parent bd2b09714b
commit efbde65589
3 changed files with 4 additions and 5 deletions

View file

@ -14,7 +14,7 @@ services:
build:
dockerfile: Dockerfile.dev
volumes:
- .:/app
- .:/app:ro
- /app/node_modules
environment:
- CHOKIDAR_USEPOLLING=true

View file

@ -9,7 +9,7 @@ FROM node:alpine as build
RUN apk add --no-cache python make g++
# install
WORKDIR /usr/src/app/
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
@ -19,4 +19,4 @@ RUN npm run build
# final
FROM base as final
COPY --from=build /usr/src/app/build /usr/share/nginx/html
COPY --from=build /app/build /usr/share/nginx/html

View file

@ -3,8 +3,7 @@ FROM node:alpine
ENV PATH /app/node_modules/.bin:$PATH
# install
RUN npm install react-scripts -g
WORKDIR /usr/src/app/
WORKDIR /app
COPY package*.json ./
RUN npm i