Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
PEDASI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Research Software Group
PEDASI
Commits
9cec04d0
Commit
9cec04d0
authored
6 years ago
by
James Graham
Browse files
Options
Downloads
Patches
Plain Diff
Add default server to Nginx config and extract ALLOWED_HOSTS from config
parent
62fada80
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
deploy/nginx/sites-available/pedasi
+1
-1
1 addition, 1 deletion
deploy/nginx/sites-available/pedasi
pedasi/settings.py
+7
-12
7 additions, 12 deletions
pedasi/settings.py
with
8 additions
and
13 deletions
deploy/nginx/sites-available/pedasi
+
1
−
1
View file @
9cec04d0
server {
server {
listen 80;
listen 80
default_server
;
server_name _;
server_name _;
merge_slashes off;
merge_slashes off;
...
...
This diff is collapsed.
Click to expand it.
pedasi/settings.py
+
7
−
12
View file @
9cec04d0
...
@@ -26,6 +26,9 @@ DEBUG
...
@@ -26,6 +26,9 @@ DEBUG
Run the server in debug mode?
Run the server in debug mode?
Default is
'
false
'
.
Default is
'
false
'
.
ALLOWED_HOSTS
List of hostnames on which the server is permitted to run
DATABASE_URL
DATABASE_URL
URL to default SQL database - in `dj-database-url <https://github.com/kennethreitz/dj-database-url>`_ format.
URL to default SQL database - in `dj-database-url <https://github.com/kennethreitz/dj-database-url>`_ format.
Default is SQLite3
'
db.sqlite3
'
in project root directory.
Default is SQLite3
'
db.sqlite3
'
in project root directory.
...
@@ -41,7 +44,7 @@ import os
...
@@ -41,7 +44,7 @@ import os
from
django.urls
import
reverse_lazy
from
django.urls
import
reverse_lazy
from
decouple
import
config
from
decouple
import
config
,
Csv
import
dj_database_url
import
dj_database_url
import
mongoengine
import
mongoengine
...
@@ -54,17 +57,9 @@ SECRET_KEY = config('SECRET_KEY')
...
@@ -54,17 +57,9 @@ SECRET_KEY = config('SECRET_KEY')
# SECURITY WARNING: don't run with debug turned on in production!
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG
=
config
(
'
DEBUG
'
,
default
=
False
,
cast
=
bool
)
DEBUG
=
config
(
'
DEBUG
'
,
default
=
False
,
cast
=
bool
)
if
DEBUG
:
ALLOWED_HOSTS
=
config
(
'
ALLOWED_HOSTS
'
,
ALLOWED_HOSTS
=
[
cast
=
Csv
(),
'
*
'
,
default
=
'
*
'
if
DEBUG
else
'
127.0.0.1,localhost.localdomain,localhost
'
)
]
else
:
ALLOWED_HOSTS
=
[
'
localhost
'
,
'
pedasi-dev.eastus.cloudapp.azure.com
'
,
]
# Application definition
# Application definition
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment