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

add details regarding relay service's database connection #66

Merged
merged 3 commits into from
Oct 25, 2023
Merged
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ The URL to ping after a loop of sending emails is complete. This can be used to

### Relay Service

At a minimum, you should configure how the relay service will connect to your SMTP server, which, depending on your SMTP server, can include any or all the following Django settings:
At a minimum, you should configure the relay service's connection to the database and how it will connect to your SMTP server, which, depending on your SMTP server, can include any or all the following Django settings:

- `EMAIL_HOST`
- `EMAIL_PORT`
Expand All @@ -417,6 +417,8 @@ When running the relay service using Docker, config values are set via environme

For settings that are dictionaries, a `__` is used to separate the keys, e.g., to set `DATABASES["default"]["CONN_MAX_AGE"]` to `600` or 10 minutes, you would set `-e "DATABASES__default__CONN_MAX_AGE=600"`.

For the database connection, [`dj-database-url`](https://github.com/jazzband/dj-database-url) is used to parse the `DATABASE_URL` environment variable, e.g., `-e "DATABASE_URL=postgres://email_relay_user:email_relay_password@localhost:5432/email_relay_db"`.

#### Django

When running the relay service from a Django project, config values are read from the Django settings for that project.
Expand Down