Webpack-dev-server: content not from webpack is served from /app/public docker

Created on 16 May 2020  ·  5Comments  ·  Source: webpack/webpack-dev-server

Hello there,

I developed a frontend application with reactjs. I distribute the application I developed with docker-compose. But while distributing, I encounter an error like below. Can you help to solve this?

Error
https://ibb.co/YtYywBr

*docker-compose.yml*

 version: "3.7"
 services:
   web:
     build:
       context: .
       dockerfile: Dockerfile.react
     container_name: web
     expose:
       - 3000
     ports:
       - "3000:3000"
     volumes:
       - /app/node_modules
       - .:/app

Dockerfile.react

 FROM node:alpine as build
 WORKDIR /app
 COPY . /app
 ENV PATH /app/node_modules/.bin:$PATH

 RUN yarn --network-timeout=30000
 RUN yarn build

 EXPOSE 3000

 CMD ["npm", "run", "start"]

package.json

{
  "name": "react-docker-project",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "@coreui/coreui": "^2.1.16",
    "@coreui/coreui-plugin-chartjs-custom-tooltips": "^1.3.1",
    "@coreui/icons": "0.3.0",
    "@coreui/react": "^2.5.7",
    "@date-io/date-fns": "^2.6.1",
    "@devexpress/dx-react-chart": "^2.6.2",
    "@devexpress/dx-react-chart-material-ui": "^2.6.2",
    "@devexpress/dx-react-core": "^2.6.2",
    "@devexpress/dx-react-grid": "^2.6.0",
    "@devexpress/dx-react-grid-material-ui": "^2.6.0",
    "@devexpress/dx-react-scheduler": "^2.6.0",
    "@devexpress/dx-react-scheduler-material-ui": "^2.6.0",
    "@material-ui/core": "^4.9.8",
    "@material-ui/icons": "^4.9.1",
    "bootstrap": "^4.4.1",
    "chart.js": "^2.9.2",
    "classnames": "^2.2.6",
    "core-js": "^3.6.4",
    "cors": "^2.8.5",
    "corsproxy": "^1.5.0",
    "date-fns": "^2.12.0",
    "dotenv": "^8.2.0",
    "enzyme": "^3.11.0",
    "enzyme-adapter-react-16": "^1.15.2",
    "flag-icon-css": "^3.4.6",
    "font-awesome": "^4.7.0",
    "http-proxy-middleware": "^0.20.0",
    "jquery": "^3.4.1",
    "jwt-decode": "^2.2.0",
    "moment": "^2.24.0",
    "node-sass": "^4.13.1",
    "nodemon": "^2.0.2",
    "prettier": "^1.18.2",
    "prop-types": "^15.7.2",
    "react-alert": "^6.0.1",
    "react-alert-template-basic": "^1.0.0",
    "react-app-polyfill": "^1.0.6",
    "react-chartjs-2": "^2.9.0",
    "react-notifications-component": "^2.4.0",
    "react-redux": "^7.2.0",
    "react-router-config": "^5.1.1",
    "react-router-dom": "^5.1.2",
    "react-test-renderer": "^16.13.1",
    "reactstrap": "^8.4.1",
    "redux": "^4.0.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-persist": "^6.0.0",
    "redux-thunk": "^2.3.0",
    "simple-line-icons": "^2.4.1",
    "typescript": "^3.8.3"
  },
  "devDependencies": {
    "react-scripts": "^3.4.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Most helpful comment

@turkdoktoru reis çözümü söyleseydin biz de faydalansaydık :)

All 5 comments

It looks like you just deleted our lovely crafted issue template. It was there for good reasons. Please help us solving your issue by answering the questions asked in this template. I'm closing this. Please either update the issue with the template and reopen, or open a new issue.

Please use stackoverflow or gitter for questions

There is no error(s)

@turkdoktoru did you manage to solve the issue ?

fatma hanım sorun çözülmedi fakat farklıbir şekilde çözdüm.
teşekkürler

Any thoughts how did overcome it?

@turkdoktoru reis çözümü söyleseydin biz de faydalansaydık :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrdulin picture mrdulin  ·  3Comments

nikirossi picture nikirossi  ·  3Comments

hnqlvs picture hnqlvs  ·  3Comments

piotrszaredko picture piotrszaredko  ·  3Comments

adiachenko picture adiachenko  ·  3Comments