Moved default configuration from inventory to ansible repository and implemented health test for friendica

This commit is contained in:
Kevin Veen-Birkenbach 2025-01-16 19:26:21 +01:00
parent 0161699e25
commit 6dd84ddb7b
3 changed files with 26 additions and 7 deletions

View File

@ -8,6 +8,20 @@ backups_folder_path: "/Backups/" # Path to the backups folder
administrator_username: "administrator" # Username of the administrator
administrator_email: "{{administrator_username}}@{{top_domain}}" # Email of the administrator
# Email Configuration
system_email_local: no-reply
system_email_domain: "{{top_domain}}"
system_email_username: "{{system_email_local}}@{{system_email_domain}}"
system_email_host: "mail.{{top_domain}}"
system_email_smtp_port: 465
system_email_tls: true
system_email_start_tls: false
system_email_from: "{{system_email_username}}"
system_email_smtp: true
# Test Email
test_email: "test@{{top_domain}}"
# Mode
# The following modes can be combined with each other
@ -134,7 +148,7 @@ domain_gitea: "git.{{top_domain}}"
domain_gitlab: "gitlab.{{top_domain}}"
domain_landingpage: "{{top_domain}}"
domain_listmonk: "newsletter.{{top_domain}}"
domain_mailu: "mail.{{top_domain}}"
domain_mailu: "{{system_email_host}}"
domain_mastodon: "microblog.{{top_domain}}"
domains_mastodon_alternates: ["mastodon.{{top_domain}}"]
domain_matomo: "matomo.{{top_domain}}"

View File

@ -47,7 +47,7 @@ docker compose exec -it application cat /etc/msmtprc
```
## email debugging:
echo "Testnachricht" | msmtp --account=system_email -t kevin@veen.world
docker compose exec -it application msmtp --account=system_email -t kevin@veen.world
## create user
INSERT INTO user (guid, username, email, password, verified, register_date, account_expires_on, account_expired)

View File

@ -10,10 +10,14 @@ services:
ports:
- "127.0.0.1:{{http_port}}:80"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:80"]
test:
[
"CMD-SHELL",
"(echo 'Subject: testmessage from {{domain}}\n\nSUCCESSFULL' | msmtp -t {{test_email}} && curl -f http://127.0.0.1:80) || exit 1"
]
interval: 1m
timeout: 10s
retries: 3
retries: 3
environment:
FRIENDICA_URL: https://{{domain}}
HOSTNAME: {{domain}}
@ -26,9 +30,9 @@ services:
FRIENDICA_LOGFILE: php://stdout
# Database Configuration
MYSQL_HOST: {{database_host}}:3306
MYSQL_HOST: {{database_host}}:3306
MYSQL_DATABASE: {{database_name}}
MYSQL_USER: {{database_username}}
MYSQL_USER: {{database_username}}
MYSQL_PASSWORD: {{database_password}}
# Email Configuration
@ -37,8 +41,9 @@ services:
SMTP_PORT: {{system_email_smtp_port}}
SMTP_AUTH_USER: {{system_email_username}}
SMTP_AUTH_PASS: {{system_email_password}}
SMTP_TLS: {{ 'on' if system_email_tls else 'off' }}
SMTP_STARTTLS: {{ 'on' if system_email_start_tls else 'off' }}
SMTP_FROM: {{system_email_from}}
SMTP_FROM: {{system_email_local}}
# Administrator Credentials
FRIENDICA_ADMIN_MAIL: {{administrator_email}}