Skip to main content

Developing

This guide explains how to run Bracket without Docker. They cover database setup, configuration and how to run the frontend and backend. If you quickly want to get up and running, please read quickstart.md.

Database

First create a bracket cluster:

sudo pg_createcluster -u postgres -p 5532 13 bracket
pg_ctlcluster 13 bracket start

Subsequently, create a new bracket_dev database. First connect via sudo -Hu postgres psql -p 5532, and then run:

CREATE USER bracket_dev WITH PASSWORD 'bracket_dev';
CREATE DATABASE bracket_dev OWNER bracket_dev;

You can do the same but replace the user and database name with:

  • bracket_ci: for running tests
  • bracket_prod: for a production database

The database URL can be specified per environment in the .env files (see config).

Running the frontend and backend

To run Bracket (frontend and backend) locally without Docker, one needs yarn and pipenv.

The following starts the frontend and backend for local development in the root directory of Bracket:

./run.sh

If either the frontend or backend doesn't shut down correctly, you can run (on Linux) killall gunicorn node.

But be careful that this will also kill other gunicorn and node processes.

In case you want to run the frontend and backend yourself, see the following two sections.

Frontend

cd frontend
yarn run dev

Backend

cd backend
pipenv install -d
pipenv shell
./run.sh

Alternative: running Bracket via process-compose

Alternatively, you can use process-compose to run the app locally. It works similarly to docker-compose, except it works with non-containerized applications.

Just install it according to the docs and then run:

cp process-compose-example.yml process-compose.yml 
process-compose up -d

Press CTRL + C (or F10) to exit.

You can adjust the config by editing process-compose.yml.