Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the database creation/seed steps #764

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,27 @@ make [app-name]
make collections-publisher
```

You'll also need to set up the database and seed data:

```
# enter the app directory, e.g. ~/govuk/whitehall
cd ~/govuk/app-name

# create development database (used locally when running `govuk-docker-up`)
govuk-docker-run rails db:create

# create test database (used locally when running tests)
govuk-docker-run rails db:create RAILS_ENV=test

# Seed the database(s)
govuk-docker-run rails db:seed
govuk-docker-run rails db:seed RAILS_ENV=test
```

👉 [Check the troubleshooting guide if you have a problem.](docs/troubleshooting.md)

## Stacks

Each project provides a number of 'stacks' for different use cases. You can see the stacks for a project in its [config file](projects/content-publisher/docker-compose.yml). To provide consistency, all projects should follow these conventions for stacks:

### The `lite` stack
Expand Down