From f7de21af7261707ae28da7de97237f7d124fcba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Wed, 18 Mar 2020 23:03:48 +0100 Subject: [PATCH] minor deploy fixes ALLOWED_HOSTS, STATIC_ROOT, `exec` in run.sh --- .gitignore | 1 + run.sh | 2 +- sdbs_pile/settings.py | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 7aaaaac..eeca304 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ db.sqlite3 docs +static dev *.ttf diff --git a/run.sh b/run.sh index ffc4d78..ed3e723 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/bash source .venv/bin/activate -gunicorn sdbs_pile.wsgi -b 127.0.0.1:8093 +exec gunicorn sdbs_pile.wsgi -b 127.0.0.1:8093 \ No newline at end of file diff --git a/sdbs_pile/settings.py b/sdbs_pile/settings.py index c37d35c..e08e4ff 100644 --- a/sdbs_pile/settings.py +++ b/sdbs_pile/settings.py @@ -24,7 +24,7 @@ SECRET_KEY = 'x5j0*70$a&l*n_@kn=j%4_@_+ismdl-o8!z0@vyjfl0tt+nlxx' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ["pile.sdbs.cz"] # Application definition @@ -112,3 +112,4 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.0/howto/static-files/ STATIC_URL = '/static/' +STATIC_ROOT = os.path.join(BASE_DIR, "static")