Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Latest commit

 

History

History
executable file
·
49 lines (31 loc) · 1.12 KB

File metadata and controls

executable file
·
49 lines (31 loc) · 1.12 KB

Setup developement project

Installing

complete this steps from README - Installing

Setup project

Create a PostgreSQL database called devicehub by running create-db:

  • Start postgresDB
  • bash examples/create-db.sh devicehub dhub, and password ereuse.
  • cp examples/env.example .env

Create a secretkey and add into .env

echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex())')" >> .env

Using the dh tool for set up with one or multiple inventories. Create the tables in the database by executing:

export dhi=dbtest; dh inv add --common --name dbtest

Create a demo table

export dhi=dbtest; dh dummy

Run project

Run the app

export FLASK_APP=app.py; export FLASK_ENV=development; flask run --debugger

Finally login into localhost:5000/login/

Troubleshooting

  • If when execute dh command it thows an error, install this dependencies in your distro
    • sudo apt install -y libpango1.0-0 libcairo2 libpq-dev