mirror of
https://github.com/evroon/bracket.git
synced 2026-05-07 07:25:45 -04:00
Add checks for docs (#362)
This commit is contained in:
@@ -5,17 +5,24 @@ sidebar_position: 2
|
||||
# Configuration
|
||||
|
||||
Copy `ci.env` to `prod.env` and fill in the values:
|
||||
|
||||
- `PG_DSN`: The URL of the PostgreSQL database
|
||||
- `JWT_SECRET`: Create a random secret using `openssl rand -hex 32`
|
||||
- `CORS_ORIGINS` and `CORS_ORIGIN_REGEX`: Specify allowed frontend domain names for CORS (see the [FastAPI docs](https://fastapi.tiangolo.com/tutorial/cors/))
|
||||
- `ADMIN_EMAIL` and `ADMIN_PASSWORD`: The credentials of the admin user, which is created when initializing the database
|
||||
- `CORS_ORIGINS` and `CORS_ORIGIN_REGEX`: Specify allowed frontend domain names for CORS (see the
|
||||
[FastAPI docs](https://fastapi.tiangolo.com/tutorial/cors/))
|
||||
- `ADMIN_EMAIL` and `ADMIN_PASSWORD`: The credentials of the admin user, which is created when
|
||||
initializing the database
|
||||
- `SENTRY_DSN`: The [Sentry](https://sentry.io) DSN for monitoring and error tracking
|
||||
- `BASE_URL`: The base url of the API used for SSO
|
||||
- `ALLOW_USER_REGISTRATION`: Can be used to disallow user registration in the web app, currently used for production while bracket is still in beta
|
||||
- `ALLOW_INSECURE_HTTP_SSO`: Should not be used in production. Allows use of INSECURE requests for SSO auth.
|
||||
- `ALLOW_USER_REGISTRATION`: Can be used to disallow user registration in the web app, currently
|
||||
used for production while bracket is still in beta
|
||||
- `ALLOW_INSECURE_HTTP_SSO`: Should not be used in production. Allows use of INSECURE requests for
|
||||
SSO auth.
|
||||
|
||||
## Example configuration file
|
||||
|
||||
This is an example of how the config file should look like:
|
||||
|
||||
```bash
|
||||
PG_DSN='postgresql://bracket_ci:bracket_ci@localhost:5532/bracket_ci'
|
||||
JWT_SECRET='60eed5c5dc7a919b8595a23d6c42ddd8274e4feea651dc028d9bee495bbb9acd'
|
||||
|
||||
@@ -3,30 +3,41 @@ sidebar_position: 1
|
||||
---
|
||||
|
||||
# Installation
|
||||
This guide explains how to run Bracket without Docker. If you quickly want to get up and running, please read [quickstart.md](quickstart.md).
|
||||
|
||||
This guide explains how to run Bracket without Docker. If you quickly want to get up and running,
|
||||
please read [quickstart.md](quickstart.md).
|
||||
|
||||
## Database
|
||||
|
||||
First create a `bracket` cluster:
|
||||
|
||||
```bash
|
||||
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:
|
||||
Subsequently, create a new `bracket_dev` database. First connect via `sudo -Hu postgres psql -p
|
||||
5532`, and then run:
|
||||
|
||||
```sql
|
||||
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](#config)).
|
||||
The database URL can be specified per environment in the `.env` files (see
|
||||
[config](configuration.md)).
|
||||
|
||||
## Running the frontend and backend
|
||||
|
||||
The following starts the frontend and backend for local development:
|
||||
|
||||
### Frontend
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
yarn
|
||||
@@ -34,6 +45,7 @@ npm run dev
|
||||
```
|
||||
|
||||
### Backend
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
pipenv install -d
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
sidebar_position: 0
|
||||
---
|
||||
|
||||
# Quickstart
|
||||
|
||||
To quickly run bracket to see how it works, clone it and run `docker-compose up`:
|
||||
|
||||
```bash
|
||||
git clone git@github.com:evroon/bracket.git
|
||||
cd bracket
|
||||
@@ -11,10 +13,11 @@ sudo docker-compose up -d
|
||||
```
|
||||
|
||||
This will start the backend and frontend of Bracket, as well as a postgres instance. You should now
|
||||
be able to view bracket at http://localhost:3000. You can log in with username `test@example.org`
|
||||
be able to view bracket at `http://localhost:3000`. You can log in with username `test@example.org`
|
||||
and password `aeGhoe1ahng2Aezai0Dei6Aih6dieHoo`.
|
||||
|
||||
To insert dummy rows into the database, run:
|
||||
|
||||
```shell
|
||||
sudo docker exec bracket-backend pipenv run ./cli.py create-dev-db
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user