Skip to content
Snippets Groups Projects
Commit 3cf648d9 authored by erichard's avatar erichard
Browse files

Instruction to setup and start the API

parent 0cc40d15
No related branches found
No related tags found
1 merge request!61Packager labelstower
This project delivers some python code for management of elements with system label within a Flask application.
# setup the webservice and start it
retrieve the application on gitlab repos
For testing purpose, a Flask demonstration web site is provided,
to create testing database. Execute the following shell commands from project's root.
```
mkdir instance
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 -c 'from models import db;db.create_all()'
mv test.db voiture.db ou codingpool.db
sqlite3 voiture.db '.read data_voiture.sql'
mv voiture.db instance/
```
git clone --branch prototype_labelsTower git@gitlab.in2p3.fr:erichard/LabelsTower.git labels-back-end.git
to be excuted with the help of Docker. You can move to the `docker` subdirectory and read the local `READ.md` for a detailed description of the provided utility scripts. For the impatient users, the recipe to start the demo wen site is :
setup the database
```
cd docker
./build_dev.sh
./run_dev.sh
```
cd labels-back-end.git
cd docker
./build_dev.sh
./run_dev.sh /bin/bash
mkdir instance
python3 -c 'from models import db;db.create_all()'
mv test.db codingpool.db
sqlite3 codingpool.db '.read data_codingpool.sql'
mv codingpool.db instance/
exit
run the application
./run_dev.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment