Skip to content

Commit

Permalink
Group docs into sections (cookiecutter#5426)
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke authored Oct 5, 2024
1 parent 6c64a81 commit b0c4522
Show file tree
Hide file tree
Showing 20 changed files with 67 additions and 45 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Here is a link to an article on `how to add HTTPS using Nginx`_ to your local do
Webpack
~~~~~~~

If you are using Webpack, first install ``mkcert``_. It is a simple by design tool that hides all the arcane knowledge required to generate valid TLS certificates. It works for any hostname or IP, including localhost. It supports macOS, Linux, and Windows, and Firefox, Chrome and Java. It even works on mobile devices with a couple manual steps. See https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/
If you are using Webpack, first install `mkcert`_. It is a simple by design tool that hides all the arcane knowledge required to generate valid TLS certificates. It works for any hostname or IP, including localhost. It supports macOS, Linux, and Windows, and Firefox, Chrome and Java. It even works on mobile devices with a couple manual steps. See https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/

.. _`mkcert`: https://github.com/FiloSottile/mkcert/blob/master/README.md#supported-root-stores

Expand All @@ -267,36 +267,36 @@ Assuming that you registered your local hostname as ``my-dev-env.local``, the ce

1. Add the ``nginx-proxy`` service to the ``docker-compose.local.yml``. ::

nginx-proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs
restart: always
depends_on:
- node
environment:
- VIRTUAL_HOST=my-dev-env.local
- VIRTUAL_PORT=3000
nginx-proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs
restart: always
depends_on:
- node
environment:
- VIRTUAL_HOST=my-dev-env.local
- VIRTUAL_PORT=3000

2. Add the local secure domain to the ``config/settings/local.py``. You should allow the new hostname ::

ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "my-dev-env.local"]
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "my-dev-env.local"]

3. Add the following configuration to the ``devServer`` section of ``webpack/dev.config.js`` ::

client: {
webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0`
},
client: {
webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0`
},


Rebuild your ``docker`` application. ::

$ docker compose -f docker-compose.local.yml up -d --build
$ docker compose -f docker-compose.local.yml up -d --build

Go to your browser and type in your URL bar ``https://my-dev-env.local``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ First things first.

$ source <virtual env path>/bin/activate

#.
.. include:: generate-project-block.rst
#. .. include:: generate-project-block.rst

#. Install development requirements: ::

Expand Down Expand Up @@ -219,7 +218,7 @@ The project comes with a simple task for manual testing purposes, inside `<proje

You can also use Django admin to queue up tasks, thanks to the `django-celerybeat`_ package.

.. _Getting started with Redis guide: https://redis.io/docs/getting-started/
.. _Getting started with Redis: https://redis.io/docs/getting-started/
.. _Celery Workers Guide: https://docs.celeryq.dev/en/stable/userguide/workers.html
.. _django-celerybeat: https://django-celery-beat.readthedocs.io/en/latest/

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/6-about/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```{include} ../../CONTRIBUTING.md
```
File renamed without changes.
3 changes: 0 additions & 3 deletions docs/contributing.md

This file was deleted.

59 changes: 41 additions & 18 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,51 @@ Powered by Cookiecutter_, Cookiecutter Django is a project template for jumpstar

.. _cookiecutter: https://github.com/cookiecutter/cookiecutter

Contents
--------
.. toctree::
:maxdepth: 2
:caption: Getting Started

1-getting-started/project-generation-options
1-getting-started/settings

.. toctree::
:maxdepth: 2
:caption: Local Development

2-local-development/developing-locally
2-local-development/developing-locally-docker

.. toctree::
:maxdepth: 2
:caption: Deployment

3-deployment/deployment-on-pythonanywhere
3-deployment/deployment-on-heroku
3-deployment/deployment-with-docker

.. toctree::
:maxdepth: 2
:caption: Guides

4-guides/docker-postgres-backups
4-guides/linters
4-guides/testing
4-guides/document
4-guides/websocket

.. toctree::
:maxdepth: 2
:caption: Help

5-help/faq
5-help/troubleshooting

.. toctree::
:maxdepth: 2
:caption: About

project-generation-options
developing-locally
developing-locally-docker
settings
linters
testing
document
deployment-on-pythonanywhere
deployment-on-heroku
deployment-with-docker
docker-postgres-backups
websocket
faq
troubleshooting
contributing
maintainer-guide
6-about/contributing
6-about/maintainer-guide

Indices and tables
------------------
Expand Down

0 comments on commit b0c4522

Please sign in to comment.