diff --git a/Dockerfile b/Dockerfile index 0a60c97..f6b8ea0 100644 --- a/Dockerfile +++ b/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 diff --git a/docker-compose.yml b/docker-compose.yml index fa276e0..b5ad061 100644 --- a/docker-compose.yml +++ b/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