frappe_docker/setup-email.sh
Tushar 56cef5fe68 feat: add backup and email configuration scripts and environment files
- Introduced backup scripts for S3 and Google Drive, including cron job setup for automated backups.
- Added email configuration script to set up SMTP settings for ERPNext.
- Created environment files for backup configurations (backup.env, gdrive-backup.env, email.env).
- Updated docker-compose files to support new backup services and configurations.
2025-03-20 10:44:25 +00:00

21 lines
No EOL
1.2 KiB
Bash
Executable file

#!/bin/bash
# Read email configuration
source email.env
# Path to your docker-compose files
COMPOSE_FILES="-f compose.yaml -f overrides/compose.mariadb.yaml -f overrides/compose.redis.yaml -f overrides/compose.https.yaml"
# Configure email settings
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g mail_server "$MAIL_HOST"
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g mail_port "$MAIL_PORT"
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g use_tls "$MAIL_USE_TLS"
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g mail_login "$MAIL_LOGIN"
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g mail_password "$MAIL_PASSWORD"
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g auto_email_id "$MAIL_EMAIL_ID"
docker compose $COMPOSE_FILES exec backend bench --site erpnext.appsatile.com set-config -g email_sender_name "$MAIL_SENDER_NAME"
# Make these configurations take effect
docker compose $COMPOSE_FILES restart backend
echo "Email configuration completed"