From ed90ead15f56493723e1fc0590c9bdb0bdccea01 Mon Sep 17 00:00:00 2001 From: Omer-5 <61422607+Omer-5@users.noreply.github.com> Date: Tue, 13 Dec 2022 23:32:57 +0200 Subject: [PATCH] Improve documentation for Getting started with Docker (#4003) Fix https://github.com/cookiecutter/cookiecutter-django/issues/3971 --- docs/developing-locally-docker.rst | 9 ++++++--- docs/developing-locally.rst | 6 +++--- docs/generate-project-block.rst | 7 +++++++ 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 docs/generate-project-block.rst diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 4bb5d903..a7d77e10 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -3,9 +3,6 @@ Getting Up and Running Locally With Docker .. index:: Docker -The steps below will get you up and running with a local development environment. -All of these commands assume you are in the root of your generated project. - .. note:: If you're new to Docker, please be aware that some resources are cached system-wide @@ -19,10 +16,16 @@ Prerequisites * Docker; if you don't have it yet, follow the `installation instructions`_; * Docker Compose; refer to the official documentation for the `installation guide`_. * Pre-commit; refer to the official documentation for the `pre-commit`_. +* Cookiecutter; refer to the official GitHub repository of `Cookiecutter`_ .. _`installation instructions`: https://docs.docker.com/install/#supported-platforms .. _`installation guide`: https://docs.docker.com/compose/install/ .. _`pre-commit`: https://pre-commit.com/#install +.. _`Cookiecutter`: https://github.com/cookiecutter/cookiecutter + +Before Getting Started +---------------------- +.. include:: generate-project-block.rst Build the Stack --------------- diff --git a/docs/developing-locally.rst b/docs/developing-locally.rst index c9d28ff7..e1c94626 100644 --- a/docs/developing-locally.rst +++ b/docs/developing-locally.rst @@ -24,9 +24,8 @@ First things first. $ source /bin/activate -#. Install cookiecutter-django: :: - - $ cookiecutter gh:cookiecutter/cookiecutter-django +#. + .. include:: generate-project-block.rst #. Install development requirements: :: @@ -43,6 +42,7 @@ First things first. #. Create a new PostgreSQL database using createdb_: :: $ createdb --username=postgres + ``project_slug`` is what you have entered as the project_slug at the setup stage. .. note:: diff --git a/docs/generate-project-block.rst b/docs/generate-project-block.rst new file mode 100644 index 00000000..2842b551 --- /dev/null +++ b/docs/generate-project-block.rst @@ -0,0 +1,7 @@ +Generate a new cookiecutter-django project: :: + + $ cookiecutter gh:cookiecutter/cookiecutter-django + +For more information refer to +:ref:`Project Generation Options `. +