archaict
2 years ago
2 changed files with 17 additions and 12 deletions
@ -1,10 +1,10 @@ |
|||||||
# FROM node:8.10-alpine |
|
||||||
FROM node:12 |
FROM node:12 |
||||||
WORKDIR /usr/src/app |
WORKDIR /react-docker |
||||||
COPY package.json ./ |
COPY ./package*.json ./ |
||||||
# RUN apt install git python3 |
ENV PATH /app/node_modules/.bin:$PATH |
||||||
RUN npm install --only=production |
RUN npm install |
||||||
RUN npm i react@16.14.0 |
RUN npm i react@16.14.0 |
||||||
|
RUN npm i react-scripts |
||||||
RUN npm audit fix |
RUN npm audit fix |
||||||
COPY . . |
|
||||||
CMD [ "npm", "start" ] |
CMD npm start --host 0.0.0.0 --port 3000 --disableHostCheck true |
||||||
|
@ -1,9 +1,14 @@ |
|||||||
version: "3.9" |
version: "3.9" |
||||||
services: |
services: |
||||||
frontend: |
frontend: |
||||||
container_name: frontend-adw |
container_name: ADW-Frontend |
||||||
restart: unless-stopped |
build: |
||||||
build: Dockerfile |
context: . |
||||||
|
dockerfile: Dockerfile |
||||||
|
volumes: |
||||||
|
- ./:/react-docker:delegated |
||||||
|
- /node_modules |
||||||
ports: |
ports: |
||||||
- "3000:3000" |
- 3000:3000 |
||||||
stdin_open: true |
environment: |
||||||
|
- CHOKIDAR_USEPOLLING=true |
||||||
|
Loading…
Reference in new issue