mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-29 17:29:45 +03:00
add env var check before updating INTERNAL_IPS
This commit is contained in:
parent
0bc9797d0f
commit
d5dbf38acb
|
@ -10,6 +10,7 @@ Local settings
|
||||||
|
|
||||||
from .common import * # noqa
|
from .common import * # noqa
|
||||||
import socket
|
import socket
|
||||||
|
import os
|
||||||
|
|
||||||
# DEBUG
|
# DEBUG
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
@ -50,8 +51,9 @@ INSTALLED_APPS += ('debug_toolbar', )
|
||||||
|
|
||||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
||||||
# tricks to have debug toolbar when developing with docker
|
# tricks to have debug toolbar when developing with docker
|
||||||
ip = socket.gethostbyname(socket.gethostname())
|
if os.environ.get('USE_DOCKER') == 'yes' :
|
||||||
INTERNAL_IPS += [ip[:-1]+"1"]
|
ip = socket.gethostbyname(socket.gethostname())
|
||||||
|
INTERNAL_IPS += [ip[:-1]+"1"]
|
||||||
|
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
'DISABLE_PANELS': [
|
'DISABLE_PANELS': [
|
||||||
|
|
|
@ -22,6 +22,7 @@ services:
|
||||||
- postgres
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER={{cookiecutter.project_slug}}
|
- POSTGRES_USER={{cookiecutter.project_slug}}
|
||||||
|
- USE_DOCKER=yes
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
ports:
|
ports:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user