fix: use official stalwart docker image
Build Stalwart Mail Yolk / build (push) Failing after 14m19s
Build Stalwart Mail Yolk / build (push) Failing after 14m19s
This commit is contained in:
@@ -11,11 +11,8 @@ export TZ
|
||||
cd /home/container || exit 1
|
||||
|
||||
# Stalwart paths
|
||||
STALWART_HOME="/home/container/stalwart-mail"
|
||||
STALWART_CONFIG="${STALWART_HOME}/config.toml"
|
||||
STALWART_DATA="${STALWART_HOME}/data"
|
||||
STALWART_CERTS="${STALWART_HOME}/certs"
|
||||
STALWART_LOGS="${STALWART_HOME}/logs"
|
||||
STALWART_HOME="/var/lib/stalwart-mail"
|
||||
STALWART_CONFIG="/etc/stalwart-mail/config.toml"
|
||||
|
||||
# Create config from template if not exists
|
||||
if [ ! -f "${STALWART_CONFIG}" ]; then
|
||||
@@ -24,15 +21,13 @@ if [ ! -f "${STALWART_CONFIG}" ]; then
|
||||
|
||||
# Replace placeholders with environment variables
|
||||
sed -i "s|{{MAIL_DOMAIN}}|${MAIL_DOMAIN:-mail.example.com}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{MAIL_HOSTNAME}}|${MAIL_HOSTNAME:-$(hostname)|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{MAIL_HOSTNAME}}|${MAIL_HOSTNAME:-$(hostname)}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{ADMIN_EMAIL}}|${ADMIN_EMAIL:-admin@${MAIL_DOMAIN:-mail.example.com}}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{HTTP_PORT}}|${HTTP_PORT:-8080}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{SMTP_PORT}}|${SMTP_PORT:-465}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{SUBMISSION_PORT}}|${SUBMISSION_PORT:-587}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{IMAP_PORT}}|${IMAP_PORT:-993}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{MANAGESIEVE_PORT}}|${MANAGESIEVE_PORT:-4190}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{STORAGE_DATA}}|${STALWART_DATA}|g" "${STALWART_CONFIG}"
|
||||
sed -i "s|{{STORAGE_LOGS}}|${STALWART_LOGS}|g" "${STALWART_CONFIG}"
|
||||
|
||||
echo "Configuration generated."
|
||||
fi
|
||||
@@ -52,13 +47,10 @@ if [ ! -f "${STALWART_HOME}/.admin_created" ]; then
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# Create admin account
|
||||
/home/container/stalwart-mail/bin/stalwart-mail --config "${STALWART_CONFIG}" --write-config
|
||||
|
||||
touch "${STALWART_HOME}/.admin_created"
|
||||
fi
|
||||
|
||||
# Clone Git repos if GIT_REPOS is set (for custom configs, filters, etc.)
|
||||
# Clone Git repos if GIT_REPOS is set
|
||||
if [ ! -z "${GIT_REPOS}" ]; then
|
||||
IFS=',' read -ra REPOS <<< "$GIT_REPOS"
|
||||
for repo in "${REPOS[@]}"; do
|
||||
|
||||
Reference in New Issue
Block a user