Skip to content

Getting Started

Robert Chu edited this page Oct 31, 2020 · 4 revisions

Getting Started

Flow by LabGrid is currently under active development. Development docker containers that support hot code reloading on edit are provided.

To run Flow in development mode:

First, setup your environment.

cp example.env .env

Edit the .env file to contain secrets appropriate for your environment.

Launch database, server, and webapp.

docker-compose build
docker-compose up

Once the database, server, and webapp are running, the database itself needs to have its schema setup/updated.

Updating your database

Whenever changes to the database schema for Flow are made, new migration(s) get created in the server/migrations/versions/ directory. To update your database to the latest version, first start the database and server containers, then run:

./server.sh db upgrade

Making a database change

To create a new database change, first edit the database schema in server/database.py. Then create a new database migration script using alembic:

./server.sh db migrate -m "Your change message goes here"

VSCode Setup

To setup VSCode pylint support for Flask + SQLAlchemy: https://stackoverflow.com/a/63105358

pylint-flask and pylint-flask-sqlalchemy are already added as development dependencies to the server's Pipfile