title: How to host multiple flask applications in a single docker container?
body: <p>In project I have two flask applications, first api is called on batch of documents and classifies them into predicted classes and it maintains the status of all batches in a json file. The work of second api is to tell the status of a particular batch by which it is hit by reading the status file. Now we can not execute the applications on different containers as both have dependency of a file. The status telling api tells the live status of a batch so we also cannot wait for the processing api to finish it's atsk first and then export the status file to be used by second api. How should I approach this challenge, any leads would be of great help. </p>
  
  <h2>Initially I was trying these lines in the docker file:</h2>
  
  <p>CMD ["python3", "./pollingAPI.py"] CMD ["python3", "./m_api.py"]</p>
  
  <h2>I also tried nohup in the command but no results:</h2>
  
  <p>RUN nohup python3 pollingAPI.py &amp; sleep 5 CMD ["python3", "./m_api.py"]</p>
  
  <h2>Using screen also couldn't work:</h2>
  
  <p>RUN nohup python3 pollingAPI.py &amp; sleep 5 &amp;&amp; screen -S myScreen CMD ["python3", "./m_api.py"]</p>