Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
7fb853f8
Commit
7fb853f8
authored
Dec 11, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CONF] Populate ALLOWED_HOSTS at setup
parent
5f5dc7b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
gargantext.template.ini
tools/conf/gargantext.template.ini
+1
-1
mkconf.sh
tools/mkconf.sh
+6
-0
No files found.
tools/conf/gargantext.template.ini
View file @
7fb853f8
...
...
@@ -5,7 +5,7 @@ DEBUG = {DEBUG}
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY
=
{SECRET_KEY}
# Space-separated list of hosts
ALLOWED_HOSTS
=
ALLOWED_HOSTS
=
{HOSTNAME}
# Time-zone, possible values here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TIME_ZONE
=
{TIME_ZONE}
# PostgreSQL access
...
...
tools/mkconf.sh
View file @
7fb853f8
...
...
@@ -90,6 +90,11 @@ fi
[
"
$DEBUG
"
=
"False"
]
&&
LOG_LEVEL
=
INFO
||
LOG_LEVEL
=
DEBUG
echo
"▸ Configure allowed hosts for Django backend..."
read
-
p
"Hostname [localhost]: "
HOSTNAME
HOSTNAME
=
${
HOSTNAME
:-
localhost
}
echo
"▸ PostgreSQL configuration..."
DB_NAME_DEFAULT
=
gargandb
...
...
@@ -140,6 +145,7 @@ DB_URI="postgres://"$(escape_url "$PGREST_USER")":"$(escape_url "$PGREST_PASS")"
PGREST_DB_URI
=
$(
escape_pgrest
"
$DB_URI
"
)
PGREST_SECRET_KEY
=
$(
escape_pgrest
"
$SECRET_KEY
"
)
SECRET_KEY
=
$(
escape_ini
"
$SECRET_KEY
"
)
HOSTNAME
=
$(
escape_ini
"
$HOSTNAME
"
)
TIME_ZONE
=
$(
escape_ini
"
$TIME_ZONE
"
)
DB_HOST
=
$(
escape_ini
"
${
DB_HOST
:-
127
.0.0.1
}
"
)
DB_PORT
=
$(
escape_ini
"
${
DB_PORT
:-
5432
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment