dockerizing-django icon indicating copy to clipboard operation
dockerizing-django copied to clipboard

Add mysql support and enhance features

Open jawabuu opened this issue 5 years ago • 3 comments

This pull request adds the following;

  • Ability to switch between postgres and mysql
  • Ability to use a remote database e.g. Amazon, CloudSQL e.t.c
  • Simplifies bringing up the project
  • Cleans up WORKDIR omissions in Dockerfile
  • Adds migrations in django compose command
  • Maintains functionality of the original repo

jawabuu avatar Jul 05 '19 15:07 jawabuu

@dbader, @DahlitzFlorian. Take a look.

jawabuu avatar Jul 05 '19 16:07 jawabuu

Hey @jawabuu, first of all thank you for your interest and your contribution! In my personal opinion this PR shouldn't be merged. The repository corresponds to an article, which tries to explain the concept of containerizing a Django application using Docker. As this article was written for beginners, the article as well as the code base is kept to be as simple as possible. You suggest a few enhancements, which are nice to know, but make it harder for beginners to understand it (at least in my personal opinion). My suggestion: Keep your repository public and share it with others. It's an example of how to enhance what is provided by this repository and by the corresponding article. But as I said, I wouldn't merge it into RPs code base.

Nevertheless, I'm curious what @dbader thinks about it.

DahlitzFlorian avatar Jul 05 '19 17:07 DahlitzFlorian

@DahlitzFlorian This is well received. The PR is a direct result of me using this repo which is excellent to introduce beginners to docker. The biggest challenge I tried to address was why a simple docker-compose up - d did not start the app. This boiled down to addressing the database layer, migrations and the WORKDIR in the Dockerfile. I believe these changes can be implemented without majorly affecting the original code. On the advanced features, I am open to feedback on how I can make these more accessible to beginners. I am currently testing these out myself. Ultimately, if we can achieve docker-compose up -d and have the app run while staying true to the article but also optionally allowing beginners to grasp and explore advanced features, I believe it would make for a richer tutorial.

jawabuu avatar Jul 05 '19 18:07 jawabuu