diff options
-rw-r--r-- | .gitlab-ci.yml | 1 | ||||
-rw-r--r-- | SETUP.md | 1 | ||||
-rw-r--r-- | pysite/settings.py | 8 |
3 files changed, 6 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 131e2089..b455fa0c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -28,6 +28,7 @@ test: services: - postgres:10-alpine script: + - python manage.py migrate - python manage.py test variables: DATABASE_URL: postgres://django:supersecret@postgres/pysite @@ -6,7 +6,6 @@ - `psql -c 'CREATE DATABASE pysite OWNER pysite;'` - `echo 'DEBUG=1' >> .env` - `echo 'DATABASE_URL=postgres://pysite:@localhost/pysite' >> .env` -- `echo 'BOT_API_KEY=123456' >> .env` - `pipenv shell` - `python manage.py migrate` - `python manage.py runserver` diff --git a/pysite/settings.py b/pysite/settings.py index 16235e09..c7a21083 100644 --- a/pysite/settings.py +++ b/pysite/settings.py @@ -40,6 +40,11 @@ if DEBUG: 'wiki.pythondiscord.local' ] SECRET_KEY = "+_x00w3e94##2-qm-v(5&-x_@*l3t9zlir1etu+7$@4%!it2##" + +elif 'CI' in os.environ: + ALLOWED_HOSTS = ['*'] + SECRET_KEY = "{©ø¬½.Þ7&Ñ`Q^Kº*~¢j<wxß¾±ðÛJ@q" + else: ALLOWED_HOSTS = [ 'pythondiscord.com', @@ -175,6 +180,3 @@ REST_FRAMEWORK = { ), 'TEST_REQUEST_DEFAULT_FORMAT': 'json' } - -# Bot API settings -BOT_API_KEY = env('BOT_API_KEY') |