Skip to content
Snippets Groups Projects
Commit e783f7f4 authored by Anthony's avatar Anthony
Browse files

Update README.md with docs

parent 23021b81
No related branches found
No related tags found
1 merge request!2Draft:Generic api v1
This commit is part of merge request !2. Comments created here will be created in the context of that merge request.
...@@ -6,7 +6,45 @@ ...@@ -6,7 +6,45 @@
## Install and run ## Install and run
### local (Not working, cause to mariaddb connexctor, see setup.py) ### Docker (preferred method)
#### Requirements
+ [docker](https://www.docker.com/)
+ [docker compose](https://docs.docker.com/compose/install/)
#### Install and run
```
cp .env.sample .env
# Edit .env file to suit your needs
docker-compose up
```
If everything is ok, [http://localhost:5000/swagger-ui/](http://localhost:5000/swagger-ui/) contains the available API.
#### Populate database
```
./cli mysql_init
```
#### Run tests
```
./cli test
```
#### Everything else
Check the available commands from the CLI :
```
./cli help
```
### Local (Not working, cause to mariaddb connexctor, see setup.py)
#### Requirements #### Requirements
...@@ -22,7 +60,7 @@ ...@@ -22,7 +60,7 @@
2. Install dependencies `pip install -e .` 2. Install dependencies `pip install -e .`
3. `cp .env.sample .env` and edit `.env` file to suit your needs 3. `cp .env.sample .env` and edit `.env` file to suit your needs
4. Run `flask --debug --app Mirador_backend.app run` 4. Run `flask --debug --app Mirador_backend.app run`
5. Go to [http://localhost:5000/mirador_resource](http://localhost:5000/mirador_resource) 5. Go to [http://localhost:5000/swagger-ui/](http://localhost:5000/swagger-ui/)
#### Production mode #### Production mode
**TODO** **TODO**
...@@ -30,26 +68,3 @@ ...@@ -30,26 +68,3 @@
### Production mode ### Production mode
**TODO** **TODO**
\ No newline at end of file
### Docker
#### Requirements
+ [docker](https://www.docker.com/)
+ [docker compose](https://docs.docker.com/compose/install/)
#### Install and run
```
cp .env.sample .env
# Edit .env file to suit your needs
docker-compose up
```
Go to [http://localhost:5000/swagger-ui/](http://localhost:5000/swagger-ui/)
#### Test
```
docker-compose exec flask python -m unittest
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment