add env var check before updating INTERNAL_IPS

This commit is contained in:
Julien Almarcha 2016-06-12 20:31:18 +02:00
parent 0bc9797d0f
commit d5dbf38acb
2 changed files with 5 additions and 2 deletions

View File

@ -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"]

View File

@ -22,6 +22,7 @@ services:
- postgres
environment:
- POSTGRES_USER={{cookiecutter.project_slug}}
- USE_DOCKER=yes
volumes:
- .:/app
ports: