Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 2.03 KB

File metadata and controls

39 lines (27 loc) · 2.03 KB

Run

Dev Containers

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.

Local development

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 is postgresql://postgres:password@fab-db:5432/fund_builder. # pragma: allowlist secret

General

Run the app with flask run (include --debug for auto reloading on file changes)

Helper Tasks

Contained in db_tasks.py

Configuration Export Tasks

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.

With Form Runner for Form Previews

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