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
|
||||
import socket
|
||||
import os
|
||||
|
||||
# DEBUG
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -50,6 +51,7 @@ INSTALLED_APPS += ('debug_toolbar', )
|
|||
|
||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
||||
# tricks to have debug toolbar when developing with docker
|
||||
if os.environ.get('USE_DOCKER') == 'yes' :
|
||||
ip = socket.gethostbyname(socket.gethostname())
|
||||
INTERNAL_IPS += [ip[:-1]+"1"]
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ services:
|
|||
- postgres
|
||||
environment:
|
||||
- POSTGRES_USER={{cookiecutter.project_slug}}
|
||||
- USE_DOCKER=yes
|
||||
volumes:
|
||||
- .:/app
|
||||
ports:
|
||||
|
|
Loading…
Reference in New Issue
Block a user