Project Allocator
Project Requirements
Running the app
Via docker-compose
:
docker compose up -f dev.docker-compose.yml [--build]
docker exec $(docker ps -qf "name=allocator" | head -n1) flask db upgrade
docker exec $(docker ps -qf "name=allocator" | head -n1) flask populate_dev
Alternatively, if you want to run the app locally (recommended for debugging):
# Terminal panel 1
docker run --rm --name project-allocator -p 2000:5432 -e POSTGRES_DB=project-allocator -e POSTGRES_USER=user -e POSTGRES_PASSWORD=pass postgres
# Terminal panel 2
export DB_OVERRIDE=postgresql://user:pass@localhost:2000/project-allocator
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
flask db upgrade
flask populate_dev
flask run
Then browse to http://localhost:5000.
Running the tests
Via docker-compose
, after upping:
docker exec $(docker ps -qf "name=allocator" | head -n1) pytest
Alternatively, if you want to run the test locally (Mac specific):
brew services start postgres
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
pytest