mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-16 01:44:51 +03:00
Replace 0.0.0.0 with 127.0.0.1.
This commit is contained in:
parent
3b0b87e4cb
commit
bf9daec084
|
@ -274,7 +274,7 @@ config/settings/local.py
|
||||||
|
|
||||||
You should allow the new hostname. ::
|
You should allow the new hostname. ::
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "my-dev-env.local"]
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1", "my-dev-env.local"]
|
||||||
|
|
||||||
Rebuild your ``docker`` application. ::
|
Rebuild your ``docker`` application. ::
|
||||||
|
|
||||||
|
|
|
@ -76,11 +76,11 @@ First things first.
|
||||||
|
|
||||||
#. If you're running synchronously, see the application being served through Django development server: ::
|
#. If you're running synchronously, see the application being served through Django development server: ::
|
||||||
|
|
||||||
$ python manage.py runserver 0.0.0.0:8000
|
$ python manage.py runserver 127.0.0.1:8000
|
||||||
|
|
||||||
or if you're running asynchronously: ::
|
or if you're running asynchronously: ::
|
||||||
|
|
||||||
$ uvicorn config.asgi:application --host 0.0.0.0 --reload
|
$ uvicorn config.asgi:application --host 127.0.0.1 --reload
|
||||||
|
|
||||||
.. _PostgreSQL: https://www.postgresql.org/download/
|
.. _PostgreSQL: https://www.postgresql.org/download/
|
||||||
.. _Redis: https://redis.io/download
|
.. _Redis: https://redis.io/download
|
||||||
|
|
|
@ -7,7 +7,7 @@ set -o nounset
|
||||||
|
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
{%- if cookiecutter.use_async == 'y' %}
|
{%- if cookiecutter.use_async == 'y' %}
|
||||||
uvicorn config.asgi:application --host 0.0.0.0 --reload
|
uvicorn config.asgi:application --host 127.0.0.1 --reload
|
||||||
{%- else %}
|
{%- else %}
|
||||||
python manage.py runserver_plus 0.0.0.0:8000
|
python manage.py runserver_plus 127.0.0.1:8000
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -28,7 +28,7 @@ if compress_enabled; then
|
||||||
fi
|
fi
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_async == 'y' %}
|
{% if cookiecutter.use_async == 'y' %}
|
||||||
/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
|
/usr/local/bin/gunicorn config.asgi --bind 127.0.0.1:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
|
||||||
{% else %}
|
{% else %}
|
||||||
/usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app
|
/usr/local/bin/gunicorn config.wsgi --bind 127.0.0.1:5000 --chdir=/app
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -11,7 +11,7 @@ SECRET_KEY = env(
|
||||||
default="!!!SET DJANGO_SECRET_KEY!!!",
|
default="!!!SET DJANGO_SECRET_KEY!!!",
|
||||||
)
|
)
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||||
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"]
|
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
|
||||||
|
|
||||||
# CACHES
|
# CACHES
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -22,7 +22,7 @@ help:
|
||||||
# Build, watch and serve docs with live reload
|
# Build, watch and serve docs with live reload
|
||||||
livehtml:
|
livehtml:
|
||||||
sphinx-autobuild -b html
|
sphinx-autobuild -b html
|
||||||
{%- if cookiecutter.use_docker == 'y' %} --host 0.0.0.0
|
{%- if cookiecutter.use_docker == 'y' %} --host 127.0.0.1
|
||||||
{%- else %} --open-browser
|
{%- else %} --open-browser
|
||||||
{%- endif %} --port 7000 --watch $(APP) -c . $(SOURCEDIR) $(BUILDDIR)/html
|
{%- endif %} --port 7000 --watch $(APP) -c . $(SOURCEDIR) $(BUILDDIR)/html
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,10 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- production_traefik:/etc/traefik/acme:z
|
- production_traefik:/etc/traefik/acme:z
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:80:80"
|
- "80:80"
|
||||||
- "0.0.0.0:443:443"
|
- "443:443"
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
- "0.0.0.0:5555:5555"
|
- "5555:5555"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user