Skip to content

Commit

Permalink
Adding changes to README (#13)
Browse files Browse the repository at this point in the history
Fixes some stuff in the readme!
  • Loading branch information
harrisoncramer authored Feb 10, 2025
1 parent e99f200 commit 083b44c
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,40 @@ To install Delta, run the following in the directory of a Go project (where a go
go get github.com/chariot-giving/delta
```

We rely on Goose to run database migrations:

```bash
go install github.com/pressly/goose/v3/cmd/goose@latest
```

Finally, install the River CLI tool:

```bash
go install github.com/riverqueue/river/cmd/river@latest
```

## Running Migrations

Run a Postgres database locally with Docker:

```bash
docker run --name delta-db -e POSTGRES_PASSWORD=password -e POSTGRES_USER=delta -e POSTGRES_DB=delta -p 5431:5432 -d postgres:16
```

Connect to the database and create the Delta schema:

```bash
$ pgcli "postgres://delta:password@localhost:5431/delta"
> CREATE SCHEMA delta;
```

Delta persists resource state to a Postgres database, and needs a small set of tables created to manage resources and orchestrate controllers.
It relies on [goose](https://github.com/pressly/goose) to run migrations.

```bash
GOOSE_DRIVER=postgres
GOOSE_DBSTRING=postgres://delta:password@localhost:5431/delta?search_path=delta
GOOSE_MIGRATION_DIR=./internal/db/migrations
export GOOSE_DRIVER=postgres
export GOOSE_DBSTRING=postgres://delta:password@localhost:5431/delta?search_path=delta
export GOOSE_MIGRATION_DIR=./internal/db/migrations
goose up
goose status
```
Expand Down

0 comments on commit 083b44c

Please sign in to comment.