7 Commits

Author SHA1 Message Date
Greg Karekinian
7d22686bc4 Update mastodon-3 node file after Chef run 2025-05-21 11:25:47 +02:00
Greg Karekinian
ce5b47e718 Configure maximum size and timespan of journald logs
Closes #506
2025-05-21 11:24:15 +02:00
d00072ee5a Merge pull request 'Delete old Mastodon media cache every day' (#593) from feature/533-delete_old_mastodon_cached_media into master
Reviewed-on: #593
Reviewed-by: Râu Cao <raucao@kosmos.org>
2025-05-17 07:06:35 +00:00
14687558fe Minor cleanup 2025-05-17 10:55:06 +04:00
de7cc69505 Allow more users per room 2025-05-17 10:42:41 +04:00
Greg Karekinian
b01315f998 Delete old Mastodon media cache every day
This is done using a systemd timer

Closes #533
2025-05-16 19:12:47 +02:00
160134bd86 Allow more ejabberd API calls from akkounts 2025-05-16 15:17:43 +04:00
5 changed files with 53 additions and 1 deletions

View File

@@ -37,6 +37,7 @@
"timezone_iii::debian",
"ntp::default",
"ntp::apparmor",
"kosmos-base::journald_conf",
"kosmos-base::systemd_emails",
"apt::unattended-upgrades",
"kosmos-base::firewall",

View File

@@ -27,6 +27,7 @@
include_recipe 'apt'
include_recipe 'timezone_iii'
include_recipe 'ntp'
include_recipe 'kosmos-base::journald_conf'
include_recipe 'kosmos-base::systemd_emails'
node.override["apt"]["unattended_upgrades"]["allowed_origins"] = [
@@ -37,6 +38,14 @@ node.override["apt"]["unattended_upgrades"]["mail"] = "ops@kosmos.org"
node.override["apt"]["unattended_upgrades"]["syslog_enable"] = true
include_recipe 'apt::unattended-upgrades'
node.override["apt"]["unattended_upgrades"]["allowed_origins"] = [
"${distro_id}:${distro_codename}-security",
"${distro_id}:${distro_codename}-updates"
]
node.override["apt"]["unattended_upgrades"]["mail"] = "ops@kosmos.org"
node.override["apt"]["unattended_upgrades"]["syslog_enable"] = true
include_recipe 'apt::unattended-upgrades'
package 'mailutils'
package 'mosh'
package 'vim'

View File

@@ -110,6 +110,7 @@ hosts = [
access_persistent: muc_create
access_register: muc_create
max_user_conferences: 1000
max_users: 2000
default_room_options:
mam: true
preload_rooms: true

View File

@@ -185,8 +185,11 @@ api_permissions:
what:
- "add_rosteritem"
- "delete_rosteritem"
- "send_message"
- "get_vcard2"
- "muc_register_nick"
- "private_set"
- "send_message"
- "send_stanza"
language: "en"

View File

@@ -265,6 +265,44 @@ service "mastodon-streaming" do
action [:enable, :start]
end
#
# Delete cached remote media older than 30 days
# Will be re-fetched if necessary
#
systemd_unit 'mastodon-delete-old-media-cache.service' do
content({
Unit: {
Description: 'Delete old Mastodon media cache'
},
Service: {
Type: "oneshot",
WorkingDirectory: mastodon_path,
Environment: "RAILS_ENV=#{rails_env}",
ExecStart: "#{bundle_path} exec bin/tootctl media remove --days 30",
}
})
triggers_reload true
action [:create]
end
systemd_unit 'mastodon-delete-old-media-cache.timer' do
content({
Unit: {
Description: 'Delete old Mastodon media cache'
},
Timer: {
OnCalendar: '*-*-* 00:00:00',
Persistent: 'true'
},
Install: {
WantedBy: 'timer.target'
}
})
triggers_reload true
action [:create, :enable, :start]
end
firewall_rule "mastodon_app" do
port node['kosmos-mastodon']['app_port']
source "10.1.1.0/24"