diff --git a/.env.sample b/.env.sample index bf9d30d..b352ff4 100644 --- a/.env.sample +++ b/.env.sample @@ -55,18 +55,20 @@ DEBUG=http # set, all domains are allowed by default when using Google OAuth to signin ALLOWED_DOMAINS= -# TODO: setup compose.smtp.yml # To support sending outgoing transactional emails such as "document updated" or # "you've been invited" you'll need to provide authentication for an SMTP server +# By default, this enables email login. You can disable this in the settings +# for configuration details see https://docs.getoutline.com/s/hosting/doc/smtp-cqCJyZGMIB +#COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml" #SMTP_ENABLED=1 #SMTP_HOST= #SMTP_PORT= #SMTP_USERNAME= -#SMTP_PASSWORD= #SMTP_FROM_EMAIL= #SMTP_REPLY_EMAIL= #SMTP_TLS_CIPHERS= #SMTP_SECURE=true +#SECRET_SMTP_PASSWORD_VERSION=v1 #COMPOSE_FILE="$COMPOSE_FILE:compose.oidc.yml" #OIDC_ENABLED=1 diff --git a/README.md b/README.md index e8cee8f..26af1b1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Wiki and knowledge base for growing teams * **Image**: [outlinewiki/outline](https://hub.docker.com/r/outlinewiki/outline) * **Healthcheck**: No * **Backups**: No -* **Email**: No +* **Email**: Yes * **Tests**: No * **SSO**: 3 (OAuth) diff --git a/abra.sh b/abra.sh index d5c7afc..36d4e1f 100644 --- a/abra.sh +++ b/abra.sh @@ -1,4 +1,4 @@ -export APP_ENTRYPOINT_VERSION=v6 +export APP_ENTRYPOINT_VERSION=v7 export DB_ENTRYPOINT_VERSION=v1 migrate() { diff --git a/compose.smtp.yml b/compose.smtp.yml new file mode 100644 index 0000000..19c8e4d --- /dev/null +++ b/compose.smtp.yml @@ -0,0 +1,18 @@ +version: "3.8" +services: + app: + secrets: + - smtp_password + environment: + - SMTP_HOST + - SMTP_PORT + - SMTP_USERNAME + - SMTP_FROM_EMAIL + - SMTP_REPLY_EMAIL + - SMTP_TLS_CIPHERS + - SMTP_SECURE + +secrets: + smtp_password: + external: true + name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION} diff --git a/entrypoint.sh.tmpl b/entrypoint.sh.tmpl index 4b67aa8..d511d61 100644 --- a/entrypoint.sh.tmpl +++ b/entrypoint.sh.tmpl @@ -2,6 +2,10 @@ export AWS_SECRET_ACCESS_KEY=$(cat /run/secrets/aws_secret_key) +{{ if eq (env "SMTP_ENABLED") "1" }} +export SMTP_PASSWORD=$(cat /run/secrets/smtp_password) +{{ end }} + {{ if eq (env "OIDC_ENABLED") "1" }} export OIDC_CLIENT_SECRET=$(cat /run/secrets/oidc_client_secret) {{ end }}