Document the Dockerfile in the project template (#4853)

pull/4858/head
Matt Westcott 2018-10-27 15:18:25 +02:00 zatwierdzone przez GitHub
rodzic 66a428f741
commit aaa0953d05
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -38,6 +38,7 @@ The project template
__init__.py
urls.py
wsgi.py
Dockerfile
manage.py
requirements.txt
@ -87,3 +88,16 @@ The Django settings files are split up into ``base.py``, ``dev.py``, ``productio
.. tip::
On production servers, we recommend that you only store secrets in ``local.py`` (such as API keys and passwords). This can save you headaches in the future if you are ever trying to debug why a server is behaving badly. If you are using multiple servers which need different settings then we recommend that you create a different ``production.py`` file for each one.
Dockerfile
----------
Location: ``/mysite/Dockerfile``
Contains configuration for building and deploying the site as a `Docker <https://docs.docker.com/>`_ container. To build and use the Docker image for your project, run:
.. code-block:: console
docker build -t mysite .
docker run -p 8000:8000 mysite