[README] update readme with TOML

Also, set gargantext-settings.toml as the default file
parent 8ce28ab3
......@@ -118,7 +118,7 @@ $ ./bin/install
From inside a Nix shell:
```shell
n$ cabal run gargantext-server -- --ini gargantext.ini --run Prod
n$ cabal run gargantext-server -- --toml gargantext-settings.toml --run Prod
```
### Initializing and running
......@@ -135,16 +135,23 @@ The initialization schema should be loaded automatically from `devops/postgres/s
#### Create configuration file
```shell
$ cp gargantext.ini_toModify gargantext.ini
$ cp gargantext-settings.toml_toModify gargantext-settings.toml
```
> `.gitignore` excludes this file, so you don't need to worry about committing it by mistake, and you can change the passwords in `gargantext.ini` safely.
**NOTE** If you had the `gargantext.ini` file before, you can automatically generate toml with:
```shell
cabal v2-run gargantext-cli -- ini --ini-path ./gargantext.ini > gargantext-settings.toml
```
> `.gitignore` excludes this file, so you don't need to worry about
> committing it by mistake, and you can change the passwords in
> `gargantext-settings.toml` safely.
#### Create master user
From within the Nix shell:
```shell
n$ gargantext-cli init --ini-path gargantext.ini
n$ gargantext-cli init
```
The master user's name is automatically set to `gargantua`, but you will be prompted for their password and email address.
......@@ -153,7 +160,7 @@ The master user's name is automatically set to `gargantua`, but you will be prom
Make sure you know where `gargantext-server` is (probably in `~/.local/bin/` or `.cabal/bin/`). If the location is in your `$PATH`, just run:
```shell
$ gargantext-server -- --ini gargantext.ini --run Prod
$ gargantext-server -- --run Prod
```
(If the location is not in your `$PATH`, just prefix `gargantext-server` with the path to it.)
......@@ -200,7 +207,7 @@ the following:
### Multi-User with Graphical User Interface (Server Mode)
``` shell
$ ~/.local/bin/stack --docker exec gargantext-server -- --ini "gargantext.ini" --run Prod
$ ~/.local/bin/stack --docker exec gargantext-server -- --run Prod
```
Then you can log in with `user1` / `1resu`
......@@ -314,7 +321,7 @@ $ psql < gargandb.dump
Maybe you need to restore the gargantua password
```shell
$ ALTER ROLE gargantua PASSWORD 'yourPasswordIn_gargantext.ini'
$ ALTER ROLE gargantua PASSWORD 'yourPasswordIn_gargantext-settings.toml'
```
Maybe you need to change the port to 5433 for database connection in your gargantext.ini file.
......
......@@ -10,6 +10,9 @@ import Options.Applicative
settings_p :: Parser SettingsFile
settings_p = maybe (SettingsFile "gargantext-settings.toml") SettingsFile <$>
optional ( strOption ( long "settings-path"
<> short 'c'
<> metavar "FILEPATH"
<> help "Location of the gargantext-settings toml file"
<> value "gargantext-settings.toml"
<> showDefault
<> help "Location of the gargantext-settings.toml file"
) )
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