Skip to content

Commit

Permalink
Update README.md to make clear to login before seeding (#461)
Browse files Browse the repository at this point in the history
* Update README.md

Make it more clear you need to log in with Google OAuth to generate the first user before you can run the seed script.

* add reference to Authentication section

* Prettier: extra blank line

* Update intro to Auth section

* Add troubleshooting to README file
  • Loading branch information
canjalal authored Nov 5, 2024
1 parent 406cf35 commit 4ea9cbc
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -58,9 +58,12 @@ There are two ways to run Compass locally:
NOTE: If you get into a login loop, double check that the Docker services are running

4. Seed database (Optional)

This runs the seed script with test data. You will first need to log in to Compass with Google OAuth
to create the first user (see **Authentication** section below). Then, run the following:

```sh
npm run db:seed # Seed the database with test data
# Must be done after login to Compass app
```

**Option 2: Run both server and supporting services locally**
@@ -98,7 +101,7 @@ There are two ways to run Compass locally:

### Authentication

.env.local file will need to be updated for sign in with Google
Your `.env.local` file will need to be updated with valid values for `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET`. This will allow you to log in with Google OAuth into Compass.

To update GOOGLE_CLIENT_ID:

@@ -162,11 +165,24 @@ Run `npm run db:migrate` to migrate the database. However, until Compass is depl

### Troubleshooting

Compass app is not running:
#### Compass app is not running:

Make sure that Docker is running in the background

#### Login screen flashes like it is stuck in a loop

Make sure that Docker is running in the background

Client id is required:
#### Seeding script does not work

Log in with your Google credentials first, and rerun to generate the first user.

### Postgres refuses to start

Ensure you have port forwarding for port 5432 from Docker to your local machine set up,
and that you are not already running Postgres in the background for another servie.

#### Client id is required:

Fill out the Google Client ID and Google Client Secret in .env.local

0 comments on commit 4ea9cbc

Please sign in to comment.