@@ -23,7 +25,6 @@ This software is free (as "Libre" in French) software, developed by the CNRS Com
GarganText Project: this repo builds the backend for the frontend server built by [backend](https://gitlab.iscpif.fr/gargantext/haskell-gargantext).
## Installation <a name="install"></a>
Disclaimer: since this project is still in development, this document remains in progress. Please report and improve this documentation if you encounter any issues.
...
...
@@ -31,6 +32,7 @@ Disclaimer: since this project is still in development, this document remains in
NOTE: if podman/docker complains about not enough space, it's probably
about tmpfs. In that case you can set
```shell
mkdir _build
export TMPDIR=$(pwd)/_build
...
...
@@ -269,14 +293,14 @@ When a development is needed on libraries (for instance, the HAL crawler in http
1. Ongoing devlopment (on local repo):
1. In `cabal.project`:
- add `../hal` to `packages:`
- turn off (temporarily) the `hal` in `source-repository-package`
* add `../hal` to `packages:`
* turn off (temporarily) the `hal` in `source-repository-package`
2. When changes work and tests are OK, commit in repo `hal`
2. When changes are commited / merged:
1. Get the hash id, and edit `cabal.project` with the **new commit id**
2. run `nix-shell --run ./bin/update-project-dependencies`
- get an error that sha256 don't match, so update the `./bin/update-project-dependencies` with new sha256 hash
- run again `nix-shell --run ./bin/update-project-dependencies` (to make sure it's a fixed point now)
* get an error that sha256 don't match, so update the `./bin/update-project-dependencies` with new sha256 hash
* run again `nix-shell --run ./bin/update-project-dependencies` (to make sure it's a fixed point now)
> Note: without `stack.yaml` we would have to only fix `cabal.project` -> `source-repository-package` commit id. Sha256 is there to make sure CI reruns the tests.
...
...
@@ -313,24 +337,49 @@ Playground is located at http://localhost:8008/gql
}
}
```
### PostgreSQL <a name="pgsql"></a>
#### Setting up system PostgreSQL (no Docker)
If you use system PostgreSQL, make sure to:
1. install `postgresql-contrib` package as well (with official postgres extensions such as `hstore`, `pgcrypto`, `fts` etc)
2. create `gargantua` user: `CREATE USER gargantua WITH ENCRYPTED PASSWORD 'xxxx'` (as `postgres`)
3. grant `CREATEDB` permissions (needed for`gargandb` and `pgmq`):`ALTER USER gargantua CREATEDB` (as `postgres`)
(If you don't want to grant such a permission, just create `gargandb` and `pgmq` databases and make `gargantua` their owner).
Also, note that `pgmq` works in a separate `pgmq` schema, so if you want, you can just use the `gargandb` database for it.
4. alter `pg_hba.conf` to have something like this:
Then, shut down the container, replace `image` section in `devops/docker/docker-compose.yaml` with `postgres:14`. Also, it is a good practice to create a new volume, say `garg-pgdata14` and bind the new container to it. If you want to keep the same volume, remember about removing it like so:
```shell
$ docker-compose rm postgres
$ docker volume rm docker_garg-pgdata
```
Now, start the container and execute:
```shell
$ # need to drop the empty DB first, since schema will be created when restoring the dump