Answers: <p>This question seems to be in two parts:</p>
  
  <ol>
  <li>How to deploy a flask+database app in Docker?</li>
  <li>Is there a non-trivial application to use as example? </li>
  </ol>
  
  <p>The second part is difficult to answer, it will depend on what you consider a good example. However, an example app with the features that you want can be deployed in several ways, and will work the same if it is in Docker or otherwise.</p>
  
  <p>The <a href="https://github.com/docker/labs/tree/master/beginner/flask-app" rel="nofollow noreferrer">Docker Labs flask example</a> contains a basic example of how to deploy a Flask app in a Docker container. </p>
  
  <p>Something more appropriate to what you are looking for though is the combination of web app and backing database. For this you likely want <a href="https://docs.docker.com/compose/" rel="nofollow noreferrer">Docker-Compose</a> - specifically the <a href="https://docs.docker.com/compose/django/#connect-the-database" rel="nofollow noreferrer">example of Docker Compose for a Django and postgresql app</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2018-11-04T18:40:00.263Z
Answers: Thanks for the pointers.  The essence of what I'm getting it is to be able to get a functional Flask+MySQL+Python app (that supports users signing up and posting content, etc.) up and running ASAP, which I could then extend to add my own features.  I think people shouldn't have to re-invent the wheel 5000 times whenever they want to make a basic web app that involves users creating content, and so I want to avoid not only duplicate base code setup, but literally already have tables and core backend logic and configuration and dependencies already there.  No multi-step setup.
Answers: paizhaulski
Answers: CC BY-SA 4.0
Answers: 2018-11-04T11:05:06.883Z
Answers: 2018-11-04T11:05:06.883Z
Answers: Bruce Becker
Body: <p>What I mean, is that I can simply run a command or download a .zip file that results in having a Dockerfile with the whole development environment baked in and includes not just Flask and MySQL set up, but some sort of sample nontrivial web application that already has tables made for users, posts, and that standard sort of content, along with the Python etc. code to go along with it.  This would be like cloning a demo Python/Flask app from git, except it comes with a Dockerfile that configures the database, creates database users and tables, etc.  A Dockerfile for other developers.  Advice?</p>
  
Comments: CC BY-SA 4.0
Comments: 2018-11-04T03:53:04.763Z
Comments: A Dockerized functional base web app that I can run as a Docker container, then actually create a user etc. through its web interface to test it out, and then I can extend the code from there
Comments: paizhaulski
Comments: CC BY-SA 4.0
Comments: 2018-11-04T11:05:28.340Z
Comments: It might make sense to split this into two separate questions.
Comments: Bruce Becker
Tags: <docker><python><flask>
Title: Where can I find a Dockerfile + required files to create a Flask/MySQL forum/webapp with users?
UserDisplayName: paizhaulski
ThreadText: # Where can I find a Dockerfile + required files to create a Flask/MySQL forum/webapp with users?
  
  (Asked by: username_0 on 2018-11-04)
  
  What I mean, is that I can simply run a command or download a .zip file that results in having a Dockerfile with the whole development environment baked in and includes not just Flask and MySQL set up, but some sort of sample nontrivial web application that already has tables made for users, posts, and that standard sort of content, along with the Python etc. code to go along with it. This would be like cloning a demo Python/Flask app from git, except it comes with a Dockerfile that configures the database, creates database users and tables, etc. A Dockerfile for other developers. Advice?
  
  **Tags:** docker, python, flask
  
  > **Comments:**
  > **username_0**: A Dockerized functional base web app that I can run as a Docker container, then actually create a user etc. through its web interface to test it out, and then I can extend the code from there  
  > **username_1**: It might make sense to split this into two separate questions.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-04. Score: 1
  
  This question seems to be in two parts:
  
  1. How to deploy a flask+database app in Docker?
  2. Is there a non-trivial application to use as example?
  
  The second part is difficult to answer, it will depend on what you consider a good example. However, an example app with the features that you want can be deployed in several ways, and will work the same if it is in Docker or otherwise.
  
  The [Docker Labs flask example](https://github.com/docker/labs/tree/master/beginner/flask-app) contains a basic example of how to deploy a Flask app in a Docker container.
  
  Something more appropriate to what you are looking for though is the combination of web app and backing database. For this you likely want [Docker-Compose](https://docs.docker.com/compose/) - specifically the [example of Docker Compose for a Django and postgresql app](https://docs.docker.com/compose/django/#connect-the-database)
  
  > **Comments:**
  > **username_0**: Thanks for the pointers.  The essence of what I'm getting it is to be able to get a functional Flask+MySQL+Python app (that supports users signing up and posting content, etc.) up and running ASAP, which I could then extend to add my own features.  I think people shouldn't have to re-invent the wheel 5000 times whenever they want to make a basic web app that involves users creating content, and so I want to avoid not only duplicate base code setup, but literally already have tables and core backend logic and configuration and dependencies already there.  No multi-step setup.  
  
  ---
  
  