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 |
||||
WORKDIR /usr/src/app |
||||
COPY package.json ./ |
||||
# RUN apt install git python3 |
||||
RUN npm install --only=production |
||||
WORKDIR /react-docker |
||||
COPY ./package*.json ./ |
||||
ENV PATH /app/node_modules/.bin:$PATH |
||||
RUN npm install |
||||
RUN npm i react@16.14.0 |
||||
RUN npm i react-scripts |
||||
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" |
||||
services: |
||||
frontend: |
||||
container_name: frontend-adw |
||||
restart: unless-stopped |
||||
build: Dockerfile |
||||
container_name: ADW-Frontend |
||||
build: |
||||
context: . |
||||
dockerfile: Dockerfile |
||||
volumes: |
||||
- ./:/react-docker:delegated |
||||
- /node_modules |
||||
ports: |
||||
- "3000:3000" |
||||
stdin_open: true |
||||
- 3000:3000 |
||||
environment: |
||||
- CHOKIDAR_USEPOLLING=true |
||||
|
Loading…
Reference in new issue