setup and start the labels system's API
retrieve the application on gitlab repos
git clone --branch prototype_labelsTower git@gitlab.in2p3.fr:erichard/LabelsTower.git labels-back-end.git
setup the database
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
Code Guards
Some python code for management of user accounts within a Flask application.
Directories
Most directories have their own README.md
.
-
codeguards
: main code, i.e. a blueprint for Flask. -
docker
: anything for building docker images with all the needed externals. -
dist
: where we build and store wheel distributions of the main codeguards code. -
test/instance
: where we initialize a test sqlite database. -
test/demo_blog
: web demo application. -
test/scripts
: various command-line test.
Demonstration from scratch, with Docker
With the help of Docker :
- Build the dev Docker image :
docker/build_externals.sh
- Build the codeguards distribution :
docker/run_externals.sh dist/build.sh
- Build the demo Docker image :
docker/build_latest.sh
(it includes the above distribution) - Initialize a database :
docker/run_latest.sh instance/init_db.sh
- Starts the flask server :
docker/run_latest.sh