Browse Source

Forwarding email relay configuration.

master
Dan Helfman 4 years ago
parent
commit
b7751c553d
  1. 21
      docker-compose.yml
  2. 3
      mediagoblin_local.ini.template

21
docker-compose.yml

@ -8,21 +8,34 @@ services:
POSTGRES_PASSWORD: "${DATABASE_PASSWORD}"
POSTGRES_DB: mediagoblin
PGDATA: /var/lib/postgresql/data/pgdata
mail-relay:
image: alterrebe/postfix-relay
environment:
RELAY_HOST_NAME: "${HOSTNAME}"
ACCEPTED_NETWORKS: 172.0.0.0/8
EXT_RELAY_HOST: "${EMAIL_HOST}"
# "0" prefix is hack to sidestep assumption that port 465 means use smtp_tls_wrappermode.
EXT_RELAY_PORT: "0${EMAIL_PORT}"
SMTP_LOGIN: "${EMAIL_USERNAME}"
SMTP_PASSWORD: "${EMAIL_PASSWORD}"
USE_TLS: "yes"
TLS_VERIFY: encrypt
volumes:
- /var/lib/postgresql/mediagoblin:/var/lib/postgresql/data/pgdata
# TODO: postfix forwarding email config?
- /etc/ssl:/etc/ssl:ro
mediagoblin:
build: .
environment:
NOTIFICATION_EMAIL: "${NOTIFICATION_EMAIL}"
EMAIL_RELAY_HOST: "mail-relay"
DATABASE_URL: "postgresql://mediagoblin:${DATABASE_PASSWORD}@database/mediagoblin"
VIRTUAL_HOST: "${DOMAIN_NAME}"
LETSENCRYPT_HOST: "${DOMAIN_NAME}"
VIRTUAL_HOST: "${HOSTNAME}"
LETSENCRYPT_HOST: "${HOSTNAME}"
LETSENCRYPT_EMAIL: "${ADMIN_EMAIL}"
volumes:
- /var/lib/mediagoblin/user_dev:/app/user_dev
depends_on:
- database
- mail-relay
nginx-proxy:
image: jwilder/nginx-proxy
ports:

3
mediagoblin_local.ini.template

@ -13,7 +13,8 @@
[mediagoblin]
direct_remote_path = /mgoblin_static/
email_sender_address = "$NOTIFICATION_ADDRESS"
email_sender_address = "$NOTIFICATION_EMAIL"
email_smtp_host = "$EMAIL_RELAY_HOST"
## Uncomment and change to your DB's appropiate setting.
## Default is a local sqlite db "mediagoblin.db".

Loading…
Cancel
Save