Skip to content
Snippets Groups Projects

feat/updating

Merged Menou Lucas requested to merge feat/updating into master
1 file
+ 14
14
Compare changes
  • Side-by-side
  • Inline
+ 15
15
@@ -2,16 +2,16 @@
## Introduction
To run ANIS need at least two databases:
As an information system ANIS needs at least two databases to function properly:
- One database to store the configuration (`metamodel database`)
- At least one database containing datasets
- One database to store the configuration, so called *metamodel database*, storing the configuration of the app itself
- At least one database containing observation datasets, the *scientific database* or *business database*
Here we will explain how the metamodel database works.
This page details how the **metamodel database** works.
## Purpose of the database
## Purpose of the metamodel database
ANIS needs a database to store all the configuration :
ANIS needs a database to store all the configuration for:
- The available business database(s) that should contains the shared datasets.
- The different scientific projects.
@@ -24,15 +24,15 @@ ANIS needs a database to store all the configuration :
## Settings
By default server container is configured to connect to a PostgreSQL database created during the first launch of docker-compose.
The docker compose integrates a PostgreSQL database server named `db`.
You can find the `docker-compose.yml` file at the root of the anis-server project.
By default, the `server` docker container is configured to connect to a PostgreSQL database created during the first launch of docker-compose.
The docker compose integrates a [PostgreSQL](https://www.postgresql.org/) database server named `db`.
You can find the `docker-compose.yml` file at the root of the `anis` project.
The database settings connection are given in the environment variables of the `server` container.
![php_settings.png](img/server_settings.png#center)
Here is the list of server container configuration concerning the metamodel database connection :
Here is the list of server container configuration concerning the metamodel database connection:
- `DATABASE_DEV_MODE`: Default to `1` in development mode and to `0` in production mode
- `DATABASE_CO_DRIVER`: Doctrine pdo driver used to connect to the database
@@ -42,11 +42,11 @@ Here is the list of server container configuration concerning the metamodel data
- `DATABASE_CO_USER`: User name used to connect to the server metamodel database
- `DATABASE_CO_PASSWORD`: Password used to connect to the server metamodel database
You are free to change this configuration to connect to another database.
You are free to change this configuration to connect to another metamodel database.
## Doctrine entities
ANIS server uses a tool called doctrine to generate the database from the code.
ANIS server uses a tool called **doctrine** to generate the database from the code.
You can find more information on the official website: [https://www.doctrine-project.org](https://www.doctrine-project.org).
Anis server stores the different doctrine entities in the `server/src/Entity` folder and each file corresponds to a table in the metamodel database.
@@ -59,10 +59,10 @@ But be careful for each change you will have to re-generate the database and the
## Doctrine command-line tool
You can use the doctrine command-line tool to perform most of the operations.
To run the tool ANIS must be started.
To run the tool, ANIS must be started.
You must be at the root of the ANIS directory.
And you can then enter into the server container by typing the following command:
You must be at the root of the ANIS directory.
You can then enter into the server container by typing the following command:
```bash
$ make shell_server
Loading