Browse Source

update docker-compose

pull/2/head
archaict 2 years ago
parent
commit
1a21c192c5
  1. 14
      Dockerfile
  2. 15
      docker-compose.yml

14
Dockerfile

@ -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

15
docker-compose.yml

@ -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…
Cancel
Save