Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IIIF
backend
Merge requests
!2
Draft:Generic api v1
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
Draft:Generic api v1
generic-api-v1
into
master
Overview
0
Commits
18
Pipelines
0
Changes
1
Open
David Beniamine
requested to merge
generic-api-v1
into
master
2 years ago
Overview
0
Commits
18
Pipelines
0
Changes
1
Adds a generic api URIs and models
Prefix path with api version
Generic config
Database initialization
Generic resources
Use generic Model
Auto documentation for parameter
Auto documentation for return values
Generic routes
group
GET
POST
item
GET
POST
PUT
PATCH
DELETE
ORM
tests
test infrastucture and simple exemple
Add data
Test storing data
Work on fake database
Edited
2 years ago
by
David Beniamine
0
0
Merge request reports
Viewing commit
e783f7f4
Prev
Next
Show latest version
1 file
+
41
−
26
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
e783f7f4
Update README.md with docs
· e783f7f4
Anthony
authored
2 years ago
Readme.md
+
41
−
26
View file @ e783f7f4
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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,34 +60,11 @@
@@ -22,34 +60,11 @@
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**
### 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
```
Loading