Skip to content
forked from diverso-lab/uvlhub

Repository of feature models in UVL format integrated with Zenodo and FlamaPy - DiversoLab

Notifications You must be signed in to change notification settings

MRomalde/uvlhub

 
 

Repository files navigation

Pytest Testing Suite Commits Syntax Checker

Logo

uvlhub.io

Repository of feature models in UVL format integrated with Zenodo and FlamaPy - Developed by DiversoLab

Clone repo

git clone https://github.com/diverso-lab/uvlhub.git

Set .env file in root with:

Create an .env file in the root of the project with this information. It is important to obtain a token in Zenodo first.

FLASK_APP_NAME=UVLHUB.IO
MYSQL_HOSTNAME=db
MYSQL_DATABASE=uvlhubdb
MYSQL_USER=uvlhubuser
MYSQL_PASSWORD=uvlhubpass
MYSQL_ROOT_PASSWORD=uvlhubrootpass
ZENODO_ACCESS_TOKEN=<GET_ACCESS_TOKEN_IN_ZENODO>

Deploy in develop

To deploy the software under development environment, run:

docker compose -f docker-compose.dev.yml up -d 

This will apply the migrations to the database and run the Flask application.

Migrations

However, if during development there are new changes in the model, run inside the web container:

flask db migrate
flask db upgrade

Tests

To run unit test, please enter inside web container:

pytest app/tests/units.py

Deploy in production (Docker Compose)

docker compose -f docker-compose.prod.yml up -d 

Deploy in production (Docker Swarm)

To have an elastic growth of services, the use of Docker Swarm is recommended.

First, we start a new cluster

docker swarm init --advertise-addr <IP_SERVER>

Now, we start the services

docker stack deploy -c docker-compose.swarm.yml uvlhub

To stop the deployment:

docker stack rm uvlhub

SSL certificates

To generate a new certificate, run:

chmod +x ssl_setup.sh && ./ssl_setup.sh

To renew a certificate that is less than 60 days from expiry, execute:

chmod +x ssl_renew.sh && ./ssl_renew.sh

Update dependencies

To update all project dependencies automatically, run:

chmod +x update_dependencies.sh && ./update_dependencies.sh

Note: it is the responsibility of the developer to check that the update of the dependencies has not broken any functionality and each dependency maintains backwards compatibility. Use the script with care!

About

Repository of feature models in UVL format integrated with Zenodo and FlamaPy - DiversoLab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 56.9%
  • Python 40.7%
  • CSS 1.2%
  • Other 1.2%