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
ba490394
Commit
ba490394
authored
Dec 06, 2017
by
sim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename TARGET to ENVIR to avoid confusion with makefile target
parent
9aa77371
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
INSTALL.md
INSTALL.md
+2
-2
Makefile
Makefile
+2
-4
mkconf.sh
tools/mkconf.sh
+5
-5
No files found.
INSTALL.md
View file @
ba490394
...
...
@@ -72,14 +72,14 @@ do:
Or for production (without dev dependencies and without
`DEBUG`
mode):
make
TARGET
=prod
make
ENVIR
=prod
If you want to specify custom paths for configuration files (by default
`gargantext.ini`
and
`postgrest.conf`
in current directory), use
`GARGANTEXT_CONF`
and
`POSTGREST_CONF`
environment variable. For example:
GARGANTEXT_CONF=/etc/gargantext/gargantext.ini \
POSTGREST_CONF=/etc/gargantext/postgrest.conf make
TARGET
=prod
POSTGREST_CONF=/etc/gargantext/postgrest.conf make
ENVIR
=prod
If everything is going well, you now have a clean virtualenv with every
packages you need to run Gargantext, and fresh configuration files.
...
...
Makefile
View file @
ba490394
POSTGREST_INIT
=
./tools/init.d/gargantext-postgrest
BACKEND_INIT
=
./tools/init.d/gargantext-testserver
ifeq
(
"$(TARGET)"
,
"prod"
)
TARG
=
prod
ifeq
(
"$(ENVIR)"
,
"prod"
)
PIPENV_ARGS
=
else
TARG
=
dev
PIPENV_ARGS
=
--dev
endif
...
...
@@ -40,7 +38,7 @@ migrate:
.PHONY
:
conf
conf
:
@
echo
"• Setup gargantext configuration..."
./tools/mkconf.sh
$(
TARG
)
./tools/mkconf.sh
$(
ENVIR
)
@
echo
.PHONY
:
checkdebian
...
...
tools/mkconf.sh
View file @
ba490394
...
...
@@ -42,8 +42,8 @@ while :; do
shift
done
#
Target
can be dev or prod
TARGET
=
"
${
1
:-
dev
}
"
#
ENVIR
can be dev or prod
ENVIR
=
"
${
1
:-
dev
}
"
# Virtual environment directory
VENV
=
$(
pipenv
--venv
)
...
...
@@ -62,7 +62,7 @@ POSTGREST_TEMPLATE=tools/conf/postgrest.template.conf
if
[
-f
"
$GARGANTEXT_CONF
"
-a
-z
"
$FORCE
"
]
;
then
echo
-e
"Configuration file
$GARGANTEXT_CONF
already exists, you may"
\
"need to edit it.
\n
To generate a new configuration anyway you"
\
"can do: ./tools/mkconf.sh -f
$
TARGET
"
"can do: ./tools/mkconf.sh -f
$
ENVIR
"
exit
fi
...
...
@@ -77,7 +77,7 @@ if ! (mkdir -p $D && touch $GARGANTEXT_CONF 2>/dev/null); then
fi
# Setup DEBUG mode for dev target
[
"
$
TARGET
"
=
"prod"
]
&&
DEBUG
=
False
||
DEBUG
=
True
[
"
$
ENVIR
"
=
"prod"
]
&&
DEBUG
=
False
||
DEBUG
=
True
echo
"▸ Generate secret key for Django..."
SECRET_KEY
=
$(
pipenv run python ./tools/gensecret.py 2>/dev/null
)
...
...
@@ -161,7 +161,7 @@ sed -E -e "s/[{]DEBUG[}]/$DEBUG/g" \
-
e
"s/[{]LOG_LEVEL[}]/
$LOG_LEVEL
/g"
\
-
e
"s/[{]VENV[}]/
$VENV
/g"
\
"
$GARGANTEXT_TEMPLATE
"
>
"
$GARGANTEXT_CONF
"
\
&&
echo
"Configuration for
$
TARGET
environment written successfully in"
\
&&
echo
"Configuration for
$
ENVIR
environment written successfully in"
\
"
$GARGANTEXT_CONF
."
echo
"▸ Generate configuration file for PostgREST from
$POSTGREST_TEMPLATE
..."
...
...
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