Commit 50492fac authored by sim's avatar sim

[DOC] Easier copy-paste of command-line in INSTALL.md

parent cbfd137b
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
You need `pipenv`, an up-to-date version of `pip`, and a PostgreSQL (>= 9.5) You need `pipenv`, an up-to-date version of `pip`, and a PostgreSQL (>= 9.5)
database. To setup development environment and run test server: database. To setup development environment and run test server:
$ git clone -b gargantext-light ssh://git@gitlab.iscpif.fr:20022/humanities/gargantext.git gargantext-light git clone -b gargantext-light ssh://git@gitlab.iscpif.fr:20022/humanities/gargantext.git gargantext-light
$ cd gargantext-light cd gargantext-light
$ make make
$ pipenv run ./manage runserver pipenv run ./manage runserver
## Requirements ## Requirements
...@@ -18,12 +18,12 @@ database. To setup development environment and run test server: ...@@ -18,12 +18,12 @@ database. To setup development environment and run test server:
On Debian-like distros, `pip` is not installed by default, if you didn't do it On Debian-like distros, `pip` is not installed by default, if you didn't do it
already: already:
$ sudo apt install python3-pip sudo apt install python3-pip
Pipenv (see below) needs an up-to-date version of pip, on a Debian-like just Pipenv (see below) needs an up-to-date version of pip, on a Debian-like just
`apt upgrade`, otherwise upgrade it like so: `apt upgrade`, otherwise upgrade it like so:
$ pip install pip --user --upgrade pip install pip --user --upgrade
### Pipenv ### Pipenv
...@@ -33,7 +33,7 @@ It handles packages and takes care of the virtualenv and environment variables. ...@@ -33,7 +33,7 @@ It handles packages and takes care of the virtualenv and environment variables.
There are various ways to install `pipenv`, see its [documentation][2] for more There are various ways to install `pipenv`, see its [documentation][2] for more
insights. Here is the straightforward way: insights. Here is the straightforward way:
$ pip install pipenv --user pip install pipenv --user
If you use `pipenv shell`, don't forget to leave the virtualenv (`exit` or If you use `pipenv shell`, don't forget to leave the virtualenv (`exit` or
`<Ctrl-D>`) and enter it again each time you install or uninstall packages with `<Ctrl-D>`) and enter it again each time you install or uninstall packages with
...@@ -47,9 +47,9 @@ If you use `pipenv shell`, don't forget to leave the virtualenv (`exit` or ...@@ -47,9 +47,9 @@ If you use `pipenv shell`, don't forget to leave the virtualenv (`exit` or
Gargantext rely on PostgreSQL (>= 9.5) for data persistence. To setup Gargantext rely on PostgreSQL (>= 9.5) for data persistence. To setup
database on a Debian-based OS: database on a Debian-based OS:
$ sudo apt-get install postgresql-9.6 postgresql-client-9.6 sudo apt-get install postgresql-9.6 postgresql-client-9.6
$ sudo -u postgres psql -c "CREATE USER gargantua PASSWORD '<pass>' CREATEROLE BYPASSRLS" sudo -u postgres psql -c "CREATE USER gargantua PASSWORD '<pass>' CREATEROLE BYPASSRLS"
$ sudo -u postgres createdb -O gargantua gargandb sudo -u postgres createdb -O gargantua gargandb
## Installation ## Installation
...@@ -57,16 +57,16 @@ database on a Debian-based OS: ...@@ -57,16 +57,16 @@ database on a Debian-based OS:
To bootstrap Gargantext environment just cd into your local Gargantext repo and To bootstrap Gargantext environment just cd into your local Gargantext repo and
do: do:
$ make make
Or for production (without dev dependencies and without DEBUG mode): Or for production (without dev dependencies and without DEBUG mode):
$ make TARGET=prod make TARGET=prod
To specify a path for configuration file (by default gargantext.ini in current To specify a path for configuration file (by default gargantext.ini in current
directory), use GARGANTEXT_CONF environment variable. For example: directory), use GARGANTEXT_CONF environment variable. For example:
$ GARGANTEXT_CONF=/etc/gargantext/gargantext.ini make TARGET=prod GARGANTEXT_CONF=/etc/gargantext/gargantext.ini make TARGET=prod
You can specify path of PostgREST configuration the same way by setting You can specify path of PostgREST configuration the same way by setting
POSTGREST_CONF environment variable. POSTGREST_CONF environment variable.
...@@ -78,7 +78,7 @@ You can now run any command by prefixing it with `pipenv run` or by first ...@@ -78,7 +78,7 @@ You can now run any command by prefixing it with `pipenv run` or by first
entering the virtualenv with `pipenv shell`. To run Gargantext django backend entering the virtualenv with `pipenv shell`. To run Gargantext django backend
test server you can do: test server you can do:
$ pipenv run ./manage.py runserver pipenv run ./manage.py runserver
## Customize dev environment ## Customize dev environment
...@@ -86,5 +86,5 @@ test server you can do: ...@@ -86,5 +86,5 @@ test server you can do:
To install specific packages without messing with dependencies, just use pip. To install specific packages without messing with dependencies, just use pip.
For example, to install ipython or bpython shells locally: For example, to install ipython or bpython shells locally:
$ pipenv run pip install ipython pipenv run pip install ipython
$ pipenv run pip install bpython pipenv run pip install bpython
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment