Browse Source

update docker-compose

pull/2/head
archaict 2 years ago
parent
commit
70d68fe32c
  1. 12
      Dockerfile
  2. 10
      docker-compose.yml

12
Dockerfile

@ -7,4 +7,14 @@ RUN npm i react@16.14.0
RUN npm i react-scripts
RUN npm audit fix
CMD npm start --host 0.0.0.0 --port 3000 --disableHostCheck true
EXPOSE 8445
# Comment as needed (Production / Dev)
# [PROD] Use for Production
# COPY . . # uncomment prod
# [DEV] Live Reload
RUN mkdir -p /react-docker/src # comment for prod
RUN mkdir -p /react-docker/public # comment for prod
CMD PORT=8445 npm start #--host 0.0.0.0 --port 3000 --disableHostCheck true

10
docker-compose.yml

@ -1,14 +1,16 @@
version: "3.9"
version: "3.3"
services:
frontend:
container_name: ADW-Frontend
tty: true
build:
context: .
dockerfile: Dockerfile
working_dir: /react-docker
volumes:
- ./:/react-docker:delegated
- /node_modules
- ./src:/react-docker/src
- ./public:/react-docker/public
ports:
- 3000:3000
- 8445:8445
environment:
- CHOKIDAR_USEPOLLING=true

Loading…
Cancel
Save