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
4036626c
Commit
4036626c
authored
Nov 20, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CONF] Support running uWSGI from outside of pipenv shell
parent
3d05f316
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
gargantext.template.ini
tools/conf/gargantext.template.ini
+3
-0
mkconf.sh
tools/mkconf.sh
+5
-0
No files found.
tools/conf/gargantext.template.ini
View file @
4036626c
...
...
@@ -24,6 +24,9 @@ endif =
# needed to run uwsgi when it was not installed with pipenv
plugins
=
python35
# needed to run uwsgi outside of pipenv shell, because of this virtualenv bug:
# https://github.com/kennethreitz/pipenv/issues/829
home
=
{VENV}
# unix socket is better than TCP one, there is less overhead
socket
=
/tmp/gargantext.sock
chmod-socket
=
664
...
...
tools/mkconf.sh
View file @
4036626c
...
...
@@ -45,6 +45,9 @@ done
# Target can be dev or prod
TARGET
=
"
${
1
:-
dev
}
"
# Virtual environment directory
VENV
=
$(
pipenv
--venv
)
# Gargantext configuration file path
[
-z
"
$GARGANTEXT_CONF
"
]
&&
GARGANTEXT_CONF
=
gargantext.ini
...
...
@@ -134,6 +137,7 @@ DB_PORT=$(escape_ini "${DB_PORT:-5432}")
DB_NAME
=
$(
escape_ini
"
$DB_NAME
"
)
DB_USER
=
$(
escape_ini
"
$DB_USER
"
)
DB_PASS
=
$(
escape_ini
"
$DB_PASS
"
)
VENV
=
$(
escape_ini
"
$VENV
"
)
echo
"▸ Generate configuration file from
$GARGANTEXT_TEMPLATE
..."
sed
-E
-e
"s/[{]DEBUG[}]/
$DEBUG
/g"
\
...
...
@@ -143,6 +147,7 @@ sed -E -e "s/[{]DEBUG[}]/$DEBUG/g" \
-e
"s/[{]DB_NAME[}]/
$DB_NAME
/g"
\
-e
"s/[{]DB_USER[}]/
$DB_USER
/g"
\
-e
"s/[{]DB_PASS[}]/
$DB_PASS
/g"
\
-e
"s/[{]VENV[}]/
$VENV
/g"
\
"
$GARGANTEXT_TEMPLATE
"
>
"
$GARGANTEXT_CONF
"
\
&&
echo
"Configuration for
$TARGET
environment written successfully in"
\
"
$GARGANTEXT_CONF
."
...
...
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