Skip to content
Snippets Groups Projects

Draft:Generic api v1

1 file
+ 41
26
Compare changes
  • Side-by-side
  • Inline
+ 46
27
@@ -6,7 +6,49 @@
## Install and run
### local
### 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
```
#### View and edit database
Use `./cli mysql` or PHPMyAdmin on `http://localhost:5001/` (check if phpmyadmin.yml is in your COMPOSE_FILE)
#### 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
@@ -22,7 +64,7 @@
2. Install dependencies `pip install -e .`
3. `cp .env.sample .env` and edit `.env` file to suit your needs
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
**TODO**
@@ -30,26 +72,3 @@
### Production mode
**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/mirador_resource](http://localhost:5000/mirador_resource)
#### Test
```
docker-compose exec flask python -m unittest
```
Loading