[README] update readme with TOML

Also, set gargantext-settings.toml as the default file
parent 8ce28ab3
Pipeline #6586 failed with stages
in 83 minutes and 4 seconds
...@@ -118,7 +118,7 @@ $ ./bin/install ...@@ -118,7 +118,7 @@ $ ./bin/install
From inside a Nix shell: From inside a Nix shell:
```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 ### Initializing and running
...@@ -135,16 +135,23 @@ The initialization schema should be loaded automatically from `devops/postgres/s ...@@ -135,16 +135,23 @@ The initialization schema should be loaded automatically from `devops/postgres/s
#### Create configuration file #### Create configuration file
```shell ```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 #### Create master user
From within the Nix shell: From within the Nix shell:
```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. 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 ...@@ -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: 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 ```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.) (If the location is not in your `$PATH`, just prefix `gargantext-server` with the path to it.)
...@@ -200,7 +207,7 @@ the following: ...@@ -200,7 +207,7 @@ the following:
### Multi-User with Graphical User Interface (Server Mode) ### Multi-User with Graphical User Interface (Server Mode)
``` shell ``` 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` Then you can log in with `user1` / `1resu`
...@@ -314,7 +321,7 @@ $ psql < gargandb.dump ...@@ -314,7 +321,7 @@ $ psql < gargandb.dump
Maybe you need to restore the gargantua password Maybe you need to restore the gargantua password
```shell ```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. Maybe you need to change the port to 5433 for database connection in your gargantext.ini file.
......
...@@ -10,6 +10,9 @@ import Options.Applicative ...@@ -10,6 +10,9 @@ import Options.Applicative
settings_p :: Parser SettingsFile settings_p :: Parser SettingsFile
settings_p = maybe (SettingsFile "gargantext-settings.toml") SettingsFile <$> settings_p = maybe (SettingsFile "gargantext-settings.toml") SettingsFile <$>
optional ( strOption ( long "settings-path" optional ( strOption ( long "settings-path"
<> short 'c'
<> metavar "FILEPATH" <> 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