Skip to content

Commit

Permalink
feat(smtp-relay): add relay smtp server configuration for sending sma…
Browse files Browse the repository at this point in the history
…il using workspace
  • Loading branch information
changchaishi committed Feb 24, 2024
1 parent f44e7ea commit 5589418
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: "3.5"
services:
mailserver:
container_name: relay-smtp-mail-server
image: boky/postfix
environment:
ALLOWED_SENDER_DOMAINS: ${ALLOWED_SENDER_DOMAINS}
RELAYHOST: "smtp-relay.gmail.com:25"
networks:
- network
web:
build: .
container_name: pycontw-2024
Expand Down
3 changes: 2 additions & 1 deletion document/deploy_docker_prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ There are four configurations that must be set when running the container.
* `DATABASE_URL` specifies how to connect to the database (in the URL form
e.g. `postgres://username:password@host_or_ip:5432/database_name`)
* `EMAIL_URL` specifies how to connect to the mail server
(e.g. `smtp+tls://username:password@host_or_ip:25`)
(e.g. `smtp+tls://username:password@host_or_ip:25`, `smtp://host_or_ip:587` for local smtp server)
* `DSN_URL` specify how to connect to Sentry error reporting service
(e.g. `https://[email protected]/project`), please refer to
[Sentry's documentation on how to obtain Data Source Name](https://docs.sentry.io/error-reporting/quickstart/?platform=python)
* (optional) `ALLOWED_SENDER_DOMAINS` - Could be `python.tw` if we [route outgoing SMTP relay messages through Google](https://support.google.com/a/answer/2956491?hl=en)
* (optional) `GTM_TRACK_ID`
* (optional) `SLACK_WEBHOOK_URL`

Expand Down

0 comments on commit 5589418

Please sign in to comment.