title: How to make friends react.js app, nginx and docker-compose?
body: <p>React app is a client, so it has some endpoint to connect to (no matter, axios http or websocket)</p>
  
  <p>Typically, backend-like clients (various modular-server microservices) obtains it from ENV, that is set up during container build process, and declared in docker-compose.yml file. Everything in a build process is required to launch app, and final step is a run command.</p>
  
  <p>React Frontend also needs build procedure, but that differs in a sense that you actually not running "bundle.js" upon build completion, and dont need all the rest after build. Actually I build on host, and in docker-compose.yml, I say: "nginx image", and "mount external config and static files as a volumes". But that way I cannot use endpoint, and nginx proxy to backend api is not working.</p>
  
  <p>Should I write Dockerfile for building frontend, and what ideas on how to integrate it to nginx resulting image? (for building I need node image, but for running I need nginx, while deleting sources and packages..</p>
  
  <hr>
  
  <p>Trying to reword it in short terms</p>
  
  <ul>
  <li>In dev mode backend:someport is running locally and frontend webserver:80 is proxyfying api requests to localhost:someport</li>
  <li>If you put backend in container nothing would change</li>
  <li>If you put webserver in container localhost:someport will stop working, because there is no is no backend:someport running inside that container, obviously...</li>
  <li>Production front needs build procedure, which involves tons of temp files</li>
  </ul>
  
  <p>Solution?</p>