瀏覽代碼

Support for real email sending without a relay.

master
Dan Helfman 1 年之前
父節點
當前提交
d69bfd5795
共有 2 個文件被更改,包括 19 次插入4 次删除
  1. 13
    3
      README.md
  2. 6
    1
      mediagoblin_local.ini.template

+ 13
- 3
README.md 查看文件

@@ -1,13 +1,18 @@
# MediaGoblin

A basic container for a private MediaGoblin media server (https://mediagoblin.org/), including Nginx and uWSGI. Assumes a separate PostgreSQL database for persistence, and an email relay host for sending email notifications.
A basic container for a private MediaGoblin media server (https://mediagoblin.org/), including Nginx and uWSGI. Assumes a separate PostgreSQL database for persistence, and an email host for sending email notifications.

Source at https://projects.torsion.org/witten/mediagoblin-docker

## Environment variables

* `NOTIFICATION_EMAIL`: From address for MediaGoblin notification emails.
* `EMAIL_RELAY_HOST`: Hostname used to send outgoing notification emails. Since MediaGoblin isn't terribly configurable as an email client, it's recommended that this "host" is a mail relay like https://hub.docker.com/r/alterrebe/postfix-relay/.
* `EMAIL_HOSTNAME`: Hostname used to send outgoing notification emails.
* `EMAIL_PORT`: Port number used to send outgoing notification emails.
* `EMAIL_USERNAME`: Username used to connect to outgoing email host.
* `EMAIL_PASSWORD`: Password used to connect to outgoing email host.
* `EMAIL_TLS_SSL`: "true" or "false" for using TLS/SSL encryption for sending emails.
* `EMAIL_STARTTLS`: "true" or "false" for using STARTTLS encryption for sending emails.
* `DATABASE_URL`: Connection string for database to use for persistence, including credentials. See example below.

## Volumes
@@ -23,7 +28,12 @@ Source at https://projects.torsion.org/witten/mediagoblin-docker
```console
docker run --detach --name=mediagoblin \
--env NOTIFICATION_EMAIL=media@example.org \
--env EMAIL_RELAY_HOST=relay.example.org \
--env EMAIL_HOSTNAME=mail.example.org \
--env EMAIL_PORT=587 \
--env EMAIL_USERNAME=bob@example.org \
--env EMAIL_PASSWORD=pass \
--env EMAIL_TLS_SSL=false \
--env EMAIL_STARTTLS=true \
--env DATABASE_URL=postgresql://mediagoblin:password@database.example.org/mediagoblin \
--volume /var/lib/mediagoblin/user_dev:/app/user_dev \
--publish 80:80 \

+ 6
- 1
mediagoblin_local.ini.template 查看文件

@@ -14,7 +14,12 @@
[mediagoblin]
direct_remote_path = /mgoblin_static/
email_sender_address = "$NOTIFICATION_EMAIL"
email_smtp_host = "$EMAIL_RELAY_HOST"
email_smtp_host = "$EMAIL_HOSTNAME"
email_smtp_port = $EMAIL_PORT
email_smtp_user = "$EMAIL_USERNAME"
email_smtp_pass = "$EMAIL_PASSWORD"
email_smtp_force_tls = $EMAIL_TLS_SSL
email_smtp_force_starttls = $EMAIL_STARTTLS

## Uncomment and change to your DB's appropiate setting.
## Default is a local sqlite db "mediagoblin.db".

Loading…
取消
儲存