Update user_data and allowed hostnames

This commit is contained in:
Dustin Pianalto 2019-12-25 21:36:37 -09:00
parent 4736fbeeba
commit 05e1b01dd8
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from .base import * # noqa from .base import * # noqa
from .base import env from .base import env
from socket import gethostname, gethostbyname
# GENERAL # GENERAL
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -7,6 +8,7 @@ from .base import env
SECRET_KEY = settings_cache.get('DJANGO_SECRET_KEY') SECRET_KEY = settings_cache.get('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 = env.list("DJANGO_ALLOWED_HOSTS", default=["geeksbot.app"]) ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["geeksbot.app"])
ALLOWED_HOSTS.extend([gethostname(), gethostbyname(gethostname())])
# DATABASES # DATABASES
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
docker build . -t geeksbot_web || exit docker build . -t geeksbot_web || exit
docker run -d -v /code/geeksbot_web:/code -v /root/.ssh:/root/.ssh:ro -v /root/ssl_certs:/etc/ssl:ro --name geeksbot_web --restart always geeksbot_web:latest || exit docker run -d -v /code/geeksbot_web:/code -v /root/.ssh:/root/.ssh:ro -v /root/ssl_certs:/etc/ssl:ro -p 80:80 -p 443:443 -p 8000:8000 --name geeksbot_web --restart always geeksbot_web:latest || exit