feat: add smtp support

This commit is contained in:
knoflook 2024-07-09 15:37:09 +02:00
parent 4c50e82865
commit 373db38548
4 changed files with 31 additions and 1 deletions

View File

@ -12,3 +12,13 @@ LOG_FILE=/data/vaultwarden.log
LOG_LEVEL=warn
SECRET_ADMIN_TOKEN_VERSION=v1 # length=48
## SMTP settings
#COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
#SECRET_SMTP_PASSWORD_VERSION=v1
#SMTP_FROM=noreply@example.com
#SMTP_USERNAME=noreply@example.com
#SMTP_HOST=mail.example.com
#SMTP_PORT=587
#SMTP_SECURITY=starttls

View File

@ -1,4 +1,4 @@
export APP_ENTRYPOINT_VERSION=v1
export APP_ENTRYPOINT_VERSION=v2
APP_DIR="app:/data"
_backup_app() {

19
compose.smtp.yml Normal file
View File

@ -0,0 +1,19 @@
---
version: "3.8"
services:
app:
secrets:
- smtp_password
environment:
- "SMTP_PASSWORD_FILE=/run/secrets/smtp_password"
- "SMTP_FROM"
- "SMTP_USERNAME"
- "SMTP_HOST"
- "SMTP_PORT"
- "SMTP_SECURITY"
secrets:
smtp_password:
external: true
name: ${STACK_NAME}_smtp_password_${SECRET_SMTP_PASSWORD_VERSION}

View File

@ -25,6 +25,7 @@ file_env() {
}
file_env "ADMIN_TOKEN"
file_env "SMTP_PASSWORD"
# upstream startup command
# https://github.com/dani-garcia/vaultwarden/blob/60ed5ff99d15dec0b82c85987f9a3e244b8bde91/docker/Dockerfile.j2#L254