realpython / dockerizing-django

https://realpython.com/blog/python/django-development-with-docker-compose-and-machine/
1.34k stars 484 forks source link

Add mysql support and enhance features #62

Open jawabuu opened 5 years ago

jawabuu commented 5 years ago

This pull request adds the following;

jawabuu commented 5 years ago

@dbader, @DahlitzFlorian. Take a look.

DahlitzFlorian commented 5 years ago

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.

jawabuu commented 5 years ago

@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.