Skip to content

PEV2 Flask service. Visualizing and understanding PostgreSQL EXPLAIN plans made easy.

License

Notifications You must be signed in to change notification settings

dalibo/explain.dalibo.com

Repository files navigation

explain.dalibo.com

PEV2 Flask application

Installation

pip install -r requirements.txt

Create a config file.

cp config.py instance

Modify the config.py file in the instance directory if needed.

Run a Postgres instance in a docker container:

docker run -p 5432:5432 --rm --name explain -e POSTGRES_PASSWORD=postgres -d postgres

Create the DB:

FLASK_APP=app flask db upgrade

Run

FLASK_APP=app python -m flask run

Run App Using Docker

docker compose up -d
docker compose run web flask db upgrade

Open http://0.0.0.0:5000/ in your browser.

Build assets

Requires Node > 16

npm install
npm run build

You can also run the app in DEBUG mode. In this case, run the following commands in two consoles.

npm run dev
FLASK_DEBUG=1 FLASK_APP=app python -m flask run

Releasing

git tag -a vx.x.x -m "x.x.x"
git push --tags