Tweak formatting of RST file

This commit is contained in:
Bruno Alla 2024-08-05 20:33:38 +01:00
parent ab77ffb2b8
commit af68f2b49d
No known key found for this signature in database

View File

@ -248,7 +248,7 @@ The stack comes with a dedicated node service to build the static assets, watch
Nginx Nginx
~~~~~ ~~~~~
If you want to use the ``users`` application with a OAuth provider such as Facebook, securing your communication to the local development environment will be necessary. Facebook requires that you use an HTTPS URL for the OAuth redirect URL for the Facebook login to work appropriately. If you want to add some sort of social authentication with a OAuth provider such as Facebook, securing your communication to the local development environment will be necessary. These providers usually require that you use an HTTPS URL for the OAuth redirect URL for the Facebook login to work appropriately.
Here is a link to an article on `how to add HTTPS using Nginx`_ to your local docker installation. This also includes how to serve files from the ``media`` location, in the event that you are want to serve user-uploaded content. Here is a link to an article on `how to add HTTPS using Nginx`_ to your local docker installation. This also includes how to serve files from the ``media`` location, in the event that you are want to serve user-uploaded content.
@ -257,11 +257,7 @@ Here is a link to an article on `how to add HTTPS using Nginx`_ to your local do
Webpack Webpack
~~~~~~~ ~~~~~~~
If you are using Webpack, first install ``mkcert``. 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`_ 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 .. _`mkcert`: https://github.com/FiloSottile/mkcert/blob/master/README.md#supported-root-stores
@ -269,8 +265,7 @@ These are the places that you should configure to secure your local environment.
Assuming that you registered your local hostname as ``my-dev-env.local``, the certificates you will put in the folder should have the names ``my-dev-env.local.crt`` and ``my-dev-env.local.key``. Assuming that you registered your local hostname as ``my-dev-env.local``, the certificates you will put in the folder should have the names ``my-dev-env.local.crt`` and ``my-dev-env.local.key``.
1. Add the ``nginx-proxy`` service to the ``docker-compose.local.yml``. 1. Add the ``nginx-proxy`` service to the ``docker-compose.local.yml``. ::
::
nginx-proxy: nginx-proxy:
image: jwilder/nginx-proxy:alpine image: jwilder/nginx-proxy:alpine
@ -288,21 +283,18 @@ Assuming that you registered your local hostname as ``my-dev-env.local``, the ce
- VIRTUAL_HOST=my-dev-env.local - VIRTUAL_HOST=my-dev-env.local
- VIRTUAL_PORT=3000 - VIRTUAL_PORT=3000
2. Add the local secure domain to the ``config/settings/local.py``. You should allow the new hostname. 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`` 3. Add the following configuration to the ``devServer`` section of ``webpack/dev.config.js`` ::
::
client: { client: {
webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0` webSocketURL: 'auto://0.0.0.0:0/ws', // note the `:0` after `0.0.0.0`
}, },
Rebuild your ``docker`` application. Rebuild your ``docker`` application. ::
::
$ docker compose -f docker-compose.local.yml up -d --build $ docker compose -f docker-compose.local.yml up -d --build