@@ -22,6 +22,8 @@ Therefore to run the application you need:
#### Configuration
For `docker-compose`, you need to create a `.env` file: `touch .env`.
The settings of the Django server is based on the `backend/.env` file. You can copy the sample file
(`cp backend/.env.sample backend/.env`) and fill in the variables.
...
...
@@ -29,4 +31,29 @@ You can of course customize more of the Django server settings in the `settings`
### Run the application
#### Populate the database
\ No newline at end of file
For the moment, only the `docker-compose.dev.yaml` is used. To run the application simply run the command:
```bash
docker-compose -f docker-compose.dev.yaml up --build
```
The `--build` option is only necessary during the first usage or when you make changes that need the docker
container to be built again.
Since directories with source codes are mounted in the containers, changes you make locally should be
directly reflected on the application.
#### Populate the database
You have a set of scripts available within the `backend/scripts` directory that you can execute directly
from within the container. First identify the container ID corresponding to the backend with `docker ps` command. Then you can execute a bash terminal within the container and execute the scripts you want:
* Import all kegg orthologies with `load_kegg.py`: It directly fetch all KEGGs KO from the KEGG REST API.
* Import genes from IGC catalog from the [annotation file](ftp://ftp.cngb.org/pub/SciRAID/Microbiome/humanGut_9.9M/GeneAnnotation/IGC.annotation_OF.summary.gz). You can a small part of this annotation file in the `dev_data` folder.