-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docs on seeding local database (#775)
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,19 @@ | ||
# Local Development | ||
|
||
## Seeding Local Database | ||
|
||
A seeded database is required for some pages on the frontend. | ||
|
||
```sh | ||
# ./berkeleytime | ||
|
||
# Ensure the MongoDB instance is already running. | ||
docker compose up -d | ||
|
||
# Download the data | ||
curl -O https://storage.googleapis.com/berkeleytime/public/stage_backup.gz | ||
|
||
# Copy the data and restore | ||
docker cp ./stage_backup.gz berkeleytime-mongodb-1:/tmp/stage_backup.gz | ||
docker exec berkeleytime-mongodb-1 mongorestore --drop --gzip --archive=/tmp/stage_backup.gz | ||
``` |