mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-07-29 06:17:57 +03:00
cluster0: Gmail mail relay (msmtp + PHP SMTP), lab cron
Mirror alpine-be msmtp for CLI; compose uses Gmail SMTP for php-fpm. Safe secrets.lab.env parser; deploy-mailrelay, install-lab-cron, verify-mail-lab. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -104,14 +104,24 @@ ISSUES_BASE="${APP_BASE_PATH:-/app/androidcast_project/issues}"
|
||||
PUBLIC_ORIGIN_CFG="${LAB_PUBLIC_ORIGIN:-https://acl0.f0xx.org}"
|
||||
load_secrets_lab
|
||||
AUTH_KEY="${AUTH_ENCRYPTION_KEY:-lab-cluster-dev-32-char-min-secret!!}"
|
||||
MAIL_TRANSPORT="${MAIL_TRANSPORT:-smtp}"
|
||||
MAIL_FROM="${MAIL_FROM:-Android Cast Lab <noreply@acl0.f0xx.org>}"
|
||||
MAIL_REPLY="${MAIL_REPLY_TO:-info@apps.f0xx.org}"
|
||||
_MSMTP_PASS="$(read_secret MSMTP_APP_PASSWORD 2>/dev/null || true)"
|
||||
[ -n "$_MSMTP_PASS" ] || _MSMTP_PASS="${MSMTP_APP_PASSWORD:-}"
|
||||
MAIL_TRANSPORT="${MAIL_TRANSPORT:-sendmail}"
|
||||
MAIL_FROM="${MAIL_FROM:-Android Cast Lab <bestcastr@gmail.com>}"
|
||||
MAIL_REPLY="${MAIL_REPLY_TO:-bestcastr@gmail.com}"
|
||||
SMTP_HOST="${SMTP_HOST:-127.0.0.1}"
|
||||
SMTP_PORT="${SMTP_PORT:-587}"
|
||||
SMTP_ENC="${SMTP_ENCRYPTION:-tls}"
|
||||
SMTP_USER="${SMTP_USER:-}"
|
||||
SMTP_USER="${SMTP_USER:-${MSMTP_USER:-}}"
|
||||
SMTP_PASS="${SMTP_PASS:-}"
|
||||
if [ -n "$_MSMTP_PASS" ]; then
|
||||
MAIL_TRANSPORT=smtp
|
||||
SMTP_HOST=smtp.gmail.com
|
||||
SMTP_USER="${MSMTP_USER:-bestcastr@gmail.com}"
|
||||
SMTP_PASS="$_MSMTP_PASS"
|
||||
MAIL_FROM="${MAIL_FROM:-Android Cast <bestcastr@gmail.com>}"
|
||||
fi
|
||||
unset _MSMTP_PASS
|
||||
mkdir -p "${COMPOSED}/config"
|
||||
log "write composed config.php base_path=${ISSUES_BASE}"
|
||||
cat > "${COMPOSED}/config/config.php" <<PHP
|
||||
|
||||
Reference in New Issue
Block a user