You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-8Lines changed: 52 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,9 @@ We track commits that are largely style/formatting via `.git-blame-ignore-revs`.
47
47
48
48
### Database
49
49
50
-
To create the database tables ...
50
+
To create the database tables you have two options: manually, or using docker-compose
51
+
52
+
#### Manual setup
51
53
52
54
1. Create the `blurts` database:
53
55
@@ -69,6 +71,28 @@ To create the database tables ...
69
71
npm run db:migrate
70
72
```
71
73
74
+
#### Via docker-compose
75
+
76
+
This will automatically provision the databases 'blurts' and 'test-blurts', and a user 'blurts' with password 'blurts'. The connection string in your .env.local file should be: "postgres://blurts:blurts@localhost:5432/blurts"
77
+
78
+
1. Ensure that you have an up-to-date .env.local file.
79
+
80
+
```$sh
81
+
cp .env.local.example .env.local
82
+
```
83
+
84
+
2. Start docker containers (this will stand up all services defined, including pubsub)
85
+
86
+
```sh
87
+
docker compose --env-file .env.local up -d
88
+
```
89
+
90
+
3. To tear down (this will delete stored data):
91
+
92
+
```sh
93
+
docker compose --env-file .env.local down
94
+
```
95
+
72
96
### Install
73
97
74
98
1. Clone and change to the directory:
@@ -140,24 +164,44 @@ To create the database tables ...
140
164
141
165
### PubSub
142
166
143
-
Monitor uses GCP PubSub for processing incoming breach data, this can be tested locally using an emulator: https://cloud.google.com/pubsub/docs/emulator
167
+
Monitor uses GCP PubSub for processing incoming breach data, this can be tested locally using an emulator: <https://cloud.google.com/pubsub/docs/emulator>
168
+
169
+
You can run the emulator manually or via docker-compose.
0 commit comments