biommap/README

110 lines
2.1 KiB
Plaintext
Raw Normal View History

2021-05-31 13:42:58 +00:00
# gl-geonature
L'instance Geonature-Citizen de Champs-Libres.
# Installation développeur (docker-compose )
## Multiple containers
Get the code (using git-submodule) for : citizen & taxhub.
```
$ git submodule update --init --recursive
```
### DB init
Creation of the table `referentielsdb` that will be used for storing data.
```
$ docker-compose up -d db
$ docker-compose exec db createdb -U postgres referentielsdb
$ docker-compose exec db psql -U postgres -d referentielsdb -c "CREATE SCHEMA taxonomie"
$ docker-compose exec db psql -d -U postgres -d referentielsdb -c "CREATE EXTENSION postgis"
```
### Taxhub
```
$ docker-compose run taxhub bash install_db.sh
$ docker-compose up -d taxhub
```
#### CREATION / Compiation du JS de Taxhub
##### Mise à jour de nppm.
```
$ docker-compose exec -u root taxhub bash
taxhub $ npm install npm@latest -g # mise à jour de npm
```
#### Compilation du code
```
$ docker-compose exec taxhub bash
taxhub $ cd static
taxhub $ cp app/constants.js.sample app/constants.js
taxhub $ npm install
```
### Citizen-front
```
docker-compose up -d citizen-front
```
Compilation du JS
```
$ docker-compose exec citizen-front bash
frontend $ npm install
frontend $ npm run build:fr
```
### Citizen-back
```
docker-compose up -d citizen-front
```
### Apache
Redigie de 8080 vers autres services :
- 4000 (citizen-front)
- 5002 (citizen-back)
- 5000 (taxon)
## Single container (depreciated)
### Creation DB (pour single container)
docker-compose exec db createdb -U postgres citizen
docker-compose exec db psql -U postgres -d citizen -c "CREATE SCHEMA taxonomie"
ref_geo
docker-compose exec db psql -d -U postgres -d citizen -c "CREATE EXTENSION postgis"
$ git submodule update --init --recursive
$ docker-compose up -d
$ docker-compose exec citizen install/install_app.sh
note: les credentials pour accéder au backend se trouvent dans /home/appuser/citizen/config
### Remise en route du service
$ docker-compose up -d
$ docker-compose exec citizen sh install/restart.sh
# Documentation :
$ make doc