Skip to content

Commit eac3ef8

Browse files
committed
update emails docs to use mkdocs code highlighting features
1 parent dc46929 commit eac3ef8

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

frontend/docs/docs/develop/emails.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ To view and edit email templates, you can run the React Email development server
66

77
```sh
88
cd emails
9+
```
10+
```sh
911
npm run dev
1012
```
1113

12-
You can then view the email templates in your browser at [http://localhost:3000](http://localhost:3000).
14+
You can then view the email templates in your browser at [localhost:3000](http://localhost:3000).
1315

1416
Templates themselves are located in the `emails` directory.
1517

@@ -20,30 +22,32 @@ Email sending can be tested locally with a tool such as [smtp4dev](https://githu
2022
If you have previously deployed the Browsertrix backend, you'll need to make some changes to your `chart/local.yaml`:
2123

2224
1. Update your `chart/local.yaml` to include the new service:
23-
```diff
25+
```yaml hl_lines="3 8"
2426
# use version specified in values.yaml, uncomment to use :latest release instead
2527
backend_image: docker.io/webrecorder/browsertrix-backend:latest
26-
+emails_image: docker.io/webrecorder/browsertrix-emails:latest
28+
emails_image: docker.io/webrecorder/browsertrix-emails:latest
2729
frontend_image: docker.io/webrecorder/browsertrix-frontend:latest
2830

2931
# overrides to use existing images in local Docker, otherwise will pull from repository
3032
backend_pull_policy: "Never"
31-
+emails_pull_policy: "Never"
33+
emails_pull_policy: "Never"
3234
frontend_pull_policy: "Never"
3335
```
3436
2. If you'd like to view emails in a service such as [smtp4dev](https://github.com/rnwood/smtp4dev) locally (see [Using smtp4dev](#using-smtp4dev)), rather than just viewing emails in pod logs, update your `chart/local.yaml` to include email sending options:
35-
```diff
36-
+email:
37-
+ smtp_host: "host.docker.internal"
38-
+ smtp_port: 2525
39-
+ sender_email: example@example.com
40-
+ password: password
41-
+ reply_to_email: example@example.com
42-
+ use_tls: false
37+
```yaml hl_lines="1-7"
38+
email:
39+
smtp_host: "host.docker.internal"
40+
smtp_port: 2525
41+
sender_email: example@example.com
42+
password: password
43+
reply_to_email: example@example.com
44+
use_tls: false
4345
```
4446
3. Build the updated backend and new emails images:
4547
```sh
4648
./scripts/build-backend.sh
49+
```
50+
```sh
4751
./scripts/build-emails.sh
4852
```
4953
4. Deploy the changes you've made:
@@ -58,6 +62,6 @@ If you're using Docker Desktop or a similar Docker-compatible Kubernetes runtime
5862
docker run --rm -it -p 5000:80 -p 2525:25 rnwood/smtp4dev
5963
```
6064

61-
After a few seconds, you can then open http://localhost:3000.
65+
After a few seconds, you can then open [localhost:3000](http://localhost:3000).
6266

6367
If you're using a different Kubernetes runtime (e.g. k3d, microk8s, etc) you may need to set `smtp_host` to something other than `host.docker.internal` in your `chart/local.yaml`, and you may also need to configure other options. k3d likely uses `host.k3d.internal`, and microk8s `10.0.1.1`, but double check with your Kubernetes runtime documentation.

0 commit comments

Comments
 (0)