Repository: cookiecutter/cookiecutter-django

Issue:
Serving media files without an external service
## Description
Currently, in order to serve media files, you need an external file storage service. Setting up an external file storage service introduces some complexity (especially for people who do not already use these services), as well as potentially extra costs. Even though it is a proper way to serve files in production, I believe it is not a requirement for all the use-cases that, in my opinion, are within the scope of cookiecutter-django. Deployment of small-scale projects could benefit by a simpler configuration.

## Proposition
I propose to have an option to serve media files without an external service.

We are using Traefik as a reverse proxy. Traefik does not serve files (by design) therefore a web server is needed to do this job. To achieve this, we can have an Nginx behind Traefik to handle the media files route **only**.

## Comments
- The trade-off is that we add yet another docker resource in the project, making it the complete system bigger (maintenance, resources, build time etc.)
- Nginx is a beast of its own
- Someone might argue why not use Nginx exclusively (why use Traefik); that was the state previously but the project switched to Caddy and later to Traefik, and part of the reason was because it is easier and safer to get automatic SSL certificates
- I am currently testing this setup with a small project and so far seems OK.

## Closing
Would the maintainers be interested to add this? Are there any major disadvantages that I am missing?

Nginx docker instance for local serve media files
It allows selecting a local nginx instance to serve media files.
It check that user choose one of AWS, GPC or nginx for serve media files.
It check that user choose docker==y if he want to serve media files by nginx local instance.
I added Arkadiusz Michał Ryś (https://github.com/arrys) to contributors besauce he open almost the same PR (https://github.com/pydanny/cookiecutter-django/pull/2457).



Discussion:
Hello how about just setting up whitenoise to serve your files? Its more simpler as compared to coming up with an inbuilt configuration.
Are we talking about static files or media files? These are 2 different things, static files are part of your code while media files are more the one that are created in the lifetime of your app (user uploaded content, generated PDF, etc...). Whitenoise [is not suitable for media files](http://whitenoise.evans.io/en/stable/django.html#serving-media-files). 
@Labohkip81 exactly what browniebroke said. Further, cookiecutter-django already provides the option to use whitenoise to serve static files.

@browniebroke I am talking about media files.
I own a very small website where I opted to use nginx to serve the media files. The additional configuration is not very hard to set up. It's like 10 lines in the docker compose and another 10 for the nginx config.


Resolving patch:
diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py
--- a/hooks/post_gen_project.py
+++ b/hooks/post_gen_project.py
@@ -491,9 +491,12 @@ def main():
             use_async=("{{ cookiecutter.use_async }}".lower() == "y"),
         )
 
-    if "{{ cookiecutter.cloud_provider }}" == "None":
+    if (
+        "{{ cookiecutter.cloud_provider }}" == "None"
+        and "{{ cookiecutter.use_docker }}".lower() == "n"
+    ):
         print(
-            WARNING + "You chose not to use a cloud provider, "
+            WARNING + "You chose to not use any cloud providers nor Docker, "
             "media files won't be served in production." + TERMINATOR
         )
         remove_storages_module()


Test patch: