This repo contains a devcontainer spec for VS code at .devcontainer. This uses docker-compose to start up a container to develop the app, and also a companion postgres instance. The default connection URLs used for tests and at runtime are set to pickup the DB from that docker-compose instance so you don't need to set anything up manually.
If developing locally, you will need a postgres instance running and to set the following environment variables:
DATABASE_URL
to a suitable connection string. The default used ispostgresql://postgres:password@fab-db:5432/fund_builder
. # pragma: allowlist secret
Run the app with flask run
(include --debug
for auto reloading on file changes)
Contained in db_tasks.py
Contained in export_tasks.py
The configuration output is generated by the config_generator module. This module contains functions to generate fund and round configuration, form JSONs, and HTML representations for a given funding round.
In order to use the 'Preview Form' function, FAB needs to connect to a running instance of form runner. For prototyping, no session is created in the form runner, so it needs to be started without expecting the JWT information.
Below is a docker-compose file that will start both the FAB app, and the form runner, with the appropriate connection information. FAB will start on http://localhost:8080 and connect to the form runner defined in docker compose. If you want to do this, create the following directory structure and put this file in docker-compose.yml under DC.
workspace
| - dc
| - docker-compose-dev.yml
| - digital-form-builder-adapter
| - funding-service-design-fund-application-builder
To run locally using digital-form-builder-adapter
docker compose -f docker-compose-dev.yml up