ConfigLMM 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/CNAME +1 -0
- data/Examples/.lmm.state.yaml +159 -0
- data/Examples/ConfigLMM.mm.yaml +32 -0
- data/Examples/Implemented.mm.yaml +252 -4
- data/Examples/SmallBusiness.mm.yaml +492 -0
- data/Plugins/Apps/Answer/answer.lmm.rb +165 -0
- data/Plugins/Apps/Answer/answer@.service +40 -0
- data/Plugins/Apps/ArchiSteamFarm/ArchiSteamFarm.conf.erb +0 -3
- data/Plugins/Apps/ArchiSteamFarm/ArchiSteamFarm.lmm.rb +0 -1
- data/Plugins/Apps/Authentik/Authentik-ProxyOutpost.container +7 -1
- data/Plugins/Apps/Authentik/Authentik-Server.container +6 -1
- data/Plugins/Apps/Authentik/Authentik-Worker.container +6 -1
- data/Plugins/Apps/Authentik/Authentik.conf.erb +12 -7
- data/Plugins/Apps/Authentik/Authentik.lmm.rb +226 -61
- data/Plugins/Apps/BookStack/BookStack.conf.erb +0 -3
- data/Plugins/Apps/BookStack/BookStack.container +5 -0
- data/Plugins/Apps/BookStack/BookStack.lmm.rb +14 -3
- data/Plugins/Apps/Cassandra/Cassandra.lmm.rb +9 -19
- data/Plugins/Apps/ClickHouse/ClickHouse.container +28 -0
- data/Plugins/Apps/ClickHouse/ClickHouse.lmm.rb +113 -0
- data/Plugins/Apps/ClickHouse/Config/listen.yaml +2 -0
- data/Plugins/Apps/ClickHouse/Config/logger.yaml +8 -0
- data/Plugins/Apps/ClickHouse/Config/zookeepers.yaml +5 -0
- data/Plugins/Apps/ClickHouse/Connection.rb +96 -0
- data/Plugins/Apps/Discourse/Discourse-Sidekiq.container +5 -0
- data/Plugins/Apps/Discourse/Discourse.conf.erb +1 -4
- data/Plugins/Apps/Discourse/Discourse.container +4 -0
- data/Plugins/Apps/Discourse/Discourse.lmm.rb +116 -55
- data/Plugins/Apps/Dovecot/Dovecot.lmm.rb +74 -62
- data/Plugins/Apps/ERPNext/ERPNext-Frontend.container +6 -1
- data/Plugins/Apps/ERPNext/ERPNext-Queue.container +5 -0
- data/Plugins/Apps/ERPNext/ERPNext-Scheduler.container +5 -0
- data/Plugins/Apps/ERPNext/ERPNext-Websocket.container +6 -1
- data/Plugins/Apps/ERPNext/ERPNext.container +6 -1
- data/Plugins/Apps/ERPNext/ERPNext.lmm.rb +138 -127
- data/Plugins/Apps/GitLab/GitLab.container +6 -0
- data/Plugins/Apps/GitLab/GitLab.lmm.rb +43 -49
- data/Plugins/Apps/Homepage/Homepage.conf.erb +86 -0
- data/Plugins/Apps/Homepage/Homepage.container +19 -0
- data/Plugins/Apps/Homepage/Homepage.lmm.rb +54 -0
- data/Plugins/Apps/IPFS/IPFS.conf.erb +0 -3
- data/Plugins/Apps/IPFS/IPFS.lmm.rb +0 -1
- data/Plugins/Apps/InfluxDB/InfluxDB.conf.erb +0 -3
- data/Plugins/Apps/InfluxDB/InfluxDB.lmm.rb +0 -1
- data/Plugins/Apps/Jackett/Jackett.conf.erb +0 -3
- data/Plugins/Apps/Jackett/Jackett.lmm.rb +0 -1
- data/Plugins/Apps/Jellyfin/Jellyfin.conf.erb +0 -3
- data/Plugins/Apps/Jellyfin/Jellyfin.lmm.rb +0 -1
- data/Plugins/Apps/LetsEncrypt/LetsEncrypt.lmm.rb +49 -28
- data/Plugins/Apps/LibreTranslate/LibreTranslate.container +21 -0
- data/Plugins/Apps/LibreTranslate/LibreTranslate.lmm.rb +34 -0
- data/Plugins/Apps/Lobsters/Containerfile +81 -0
- data/Plugins/Apps/Lobsters/Lobsters-Tasks.container +26 -0
- data/Plugins/Apps/Lobsters/Lobsters.conf.erb +99 -0
- data/Plugins/Apps/Lobsters/Lobsters.container +27 -0
- data/Plugins/Apps/Lobsters/Lobsters.lmm.rb +196 -0
- data/Plugins/Apps/Lobsters/crontab +3 -0
- data/Plugins/Apps/Lobsters/database.yml +26 -0
- data/Plugins/Apps/Lobsters/entrypoint.sh +30 -0
- data/Plugins/Apps/Lobsters/generateCredentials.rb +19 -0
- data/Plugins/Apps/Lobsters/lobsters-cron.sh +25 -0
- data/Plugins/Apps/Lobsters/lobsters-daily.sh +23 -0
- data/Plugins/Apps/Lobsters/puma.rb +49 -0
- data/Plugins/Apps/MariaDB/Connection.rb +55 -0
- data/Plugins/Apps/MariaDB/MariaDB.lmm.rb +60 -53
- data/Plugins/Apps/Mastodon/Mastodon-Sidekiq.container +22 -0
- data/Plugins/Apps/Mastodon/Mastodon-Streaming.container +20 -0
- data/Plugins/Apps/Mastodon/Mastodon.conf.erb +34 -45
- data/Plugins/Apps/Mastodon/Mastodon.container +28 -0
- data/Plugins/Apps/Mastodon/Mastodon.lmm.rb +240 -5
- data/Plugins/Apps/Mastodon/configlmm.rake +30 -0
- data/Plugins/Apps/Mastodon/entrypoint.sh +16 -0
- data/Plugins/Apps/Matrix/Element.container +5 -0
- data/Plugins/Apps/Matrix/Matrix.conf.erb +2 -8
- data/Plugins/Apps/Matrix/Matrix.lmm.rb +100 -71
- data/Plugins/Apps/Matrix/Synapse.container +5 -0
- data/Plugins/Apps/Netdata/Netdata.conf.erb +0 -3
- data/Plugins/Apps/Netdata/Netdata.lmm.rb +0 -1
- data/Plugins/Apps/Nextcloud/Nextcloud.conf.erb +3 -4
- data/Plugins/Apps/Nextcloud/Nextcloud.lmm.rb +150 -68
- data/Plugins/Apps/Nextcloud/autoconfig.php +13 -0
- data/Plugins/Apps/Nextcloud/config.php +10 -1
- data/Plugins/Apps/Nextcloud/nextcloudcron.service +8 -0
- data/Plugins/Apps/Nextcloud/nextcloudcron.timer +10 -0
- data/Plugins/Apps/Nginx/Connection.rb +93 -0
- data/Plugins/Apps/Nginx/conf.d/configlmm.conf +50 -9
- data/Plugins/Apps/Nginx/conf.d/languages.conf +21 -0
- data/Plugins/Apps/Nginx/config-lmm/errors.conf +25 -20
- data/Plugins/Apps/Nginx/config-lmm/gateway-errors.conf +20 -0
- data/Plugins/Apps/Nginx/config-lmm/proxy.conf +1 -1
- data/Plugins/Apps/Nginx/main.conf.erb +7 -3
- data/Plugins/Apps/Nginx/nginx.conf +2 -2
- data/Plugins/Apps/Nginx/nginx.lmm.rb +99 -81
- data/Plugins/Apps/Nginx/proxy.conf.erb +11 -3
- data/Plugins/Apps/Odoo/Odoo.conf.erb +0 -3
- data/Plugins/Apps/Odoo/Odoo.container +5 -0
- data/Plugins/Apps/Odoo/Odoo.lmm.rb +4 -5
- data/Plugins/Apps/Ollama/Ollama.container +26 -0
- data/Plugins/Apps/Ollama/Ollama.lmm.rb +73 -0
- data/Plugins/Apps/OpenTelemetry/Config/config.yaml +704 -0
- data/Plugins/Apps/OpenTelemetry/OpenTelemetry.lmm.rb +154 -0
- data/Plugins/Apps/OpenVidu/Ingress.container +5 -0
- data/Plugins/Apps/OpenVidu/OpenVidu.conf.erb +0 -3
- data/Plugins/Apps/OpenVidu/OpenVidu.container +5 -0
- data/Plugins/Apps/OpenVidu/OpenVidu.lmm.rb +7 -3
- data/Plugins/Apps/OpenVidu/OpenViduCall.conf.erb +0 -3
- data/Plugins/Apps/OpenVidu/OpenViduCall.container +5 -0
- data/Plugins/Apps/PHP-FPM/Connection.rb +91 -0
- data/Plugins/Apps/PHP-FPM/PHP-FPM.lmm.rb +31 -4
- data/Plugins/Apps/Peppermint/Peppermint.conf.erb +2 -5
- data/Plugins/Apps/Peppermint/Peppermint.container +5 -0
- data/Plugins/Apps/Peppermint/Peppermint.lmm.rb +29 -33
- data/Plugins/Apps/Perplexica/Perplexica.container +25 -0
- data/Plugins/Apps/Perplexica/Perplexica.lmm.rb +92 -0
- data/Plugins/Apps/Perplexica/config.toml +26 -0
- data/Plugins/Apps/Podman/Connection.rb +24 -0
- data/Plugins/Apps/Podman/Podman.lmm.rb +80 -0
- data/Plugins/Apps/Podman/storage.conf +6 -0
- data/Plugins/Apps/Postfix/Postfix.lmm.rb +242 -164
- data/Plugins/Apps/PostgreSQL/Connection.rb +97 -0
- data/Plugins/Apps/PostgreSQL/PostgreSQL.lmm.rb +184 -148
- data/Plugins/Apps/Pterodactyl/Pterodactyl.conf.erb +0 -3
- data/Plugins/Apps/Pterodactyl/Pterodactyl.lmm.rb +0 -2
- data/Plugins/Apps/Pterodactyl/Wings.conf.erb +0 -3
- data/Plugins/Apps/RVM/RVM.lmm.rb +57 -0
- data/Plugins/Apps/Roundcube/Roundcube.conf.erb +0 -3
- data/Plugins/Apps/Roundcube/Roundcube.lmm.rb +15 -19
- data/Plugins/Apps/SSH/SSH.lmm.rb +9 -15
- data/Plugins/Apps/SearXNG/SearXNG.container +22 -0
- data/Plugins/Apps/SearXNG/SearXNG.lmm.rb +79 -0
- data/Plugins/Apps/SearXNG/limiter.toml +40 -0
- data/Plugins/Apps/SearXNG/settings.yml +2 -0
- data/Plugins/Apps/SigNoz/Config/alerts.yml +11 -0
- data/Plugins/Apps/SigNoz/Config/otel-collector-config.yaml +110 -0
- data/Plugins/Apps/SigNoz/Config/otel-collector-opamp-config.yaml +1 -0
- data/Plugins/Apps/SigNoz/Config/prometheus.yml +18 -0
- data/Plugins/Apps/SigNoz/SigNoz-Collector.container +23 -0
- data/Plugins/Apps/SigNoz/SigNoz-Migrator.container +17 -0
- data/Plugins/Apps/SigNoz/SigNoz.conf.erb +61 -0
- data/Plugins/Apps/SigNoz/SigNoz.container +26 -0
- data/Plugins/Apps/SigNoz/SigNoz.lmm.rb +319 -0
- data/Plugins/Apps/Solr/log4j2.xml +89 -0
- data/Plugins/Apps/Solr/solr.lmm.rb +82 -0
- data/Plugins/Apps/Sunshine/Sunshine.conf.erb +0 -3
- data/Plugins/Apps/Sunshine/Sunshine.lmm.rb +0 -1
- data/Plugins/Apps/Tunnel/tunnel.lmm.rb +33 -37
- data/Plugins/Apps/UVdesk/UVdesk.conf.erb +0 -3
- data/Plugins/Apps/Umami/Umami.container +19 -0
- data/Plugins/Apps/Umami/Umami.lmm.rb +108 -0
- data/Plugins/Apps/Valkey/Valkey.lmm.rb +54 -42
- data/Plugins/Apps/Vaultwarden/Vaultwarden.conf.erb +9 -6
- data/Plugins/Apps/Vaultwarden/Vaultwarden.container +7 -1
- data/Plugins/Apps/Vaultwarden/Vaultwarden.lmm.rb +64 -29
- data/Plugins/Apps/Wiki.js/Wiki.js.conf.erb +1 -4
- data/Plugins/Apps/Wiki.js/Wiki.js.container +5 -0
- data/Plugins/Apps/Wiki.js/Wiki.js.lmm.rb +31 -37
- data/Plugins/Apps/YaCy/YaCy.conf.erb +93 -0
- data/Plugins/Apps/YaCy/YaCy.container +21 -0
- data/Plugins/Apps/YaCy/YaCy.lmm.rb +160 -0
- data/Plugins/Apps/ZooKeeper/ZooKeeper.container +24 -0
- data/Plugins/Apps/ZooKeeper/ZooKeeper.lmm.rb +68 -0
- data/Plugins/Apps/bitmagnet/bitmagnet.conf.erb +0 -3
- data/Plugins/Apps/bitmagnet/bitmagnet.lmm.rb +0 -1
- data/Plugins/Apps/gollum/gollum.conf.erb +2 -4
- data/Plugins/Apps/gollum/gollum.container +6 -0
- data/Plugins/Apps/gollum/gollum.lmm.rb +51 -50
- data/Plugins/Apps/llama.cpp/llama.cpp.container +28 -0
- data/Plugins/Apps/llama.cpp/llama.cpp.lmm.rb +90 -0
- data/Plugins/Apps/vLLM/vLLM.container +32 -0
- data/Plugins/Apps/vLLM/vLLM.lmm.rb +89 -0
- data/Plugins/OS/General/Utils.lmm.rb +26 -0
- data/Plugins/OS/Linux/Connection.rb +472 -0
- data/Plugins/OS/Linux/Debian/preseed.cfg.erb +25 -6
- data/Plugins/OS/Linux/Flavours.yaml +13 -0
- data/Plugins/OS/Linux/Grub/grub.cfg +10 -0
- data/Plugins/OS/Linux/HTTP.rb +32 -0
- data/Plugins/OS/Linux/Linux.lmm.rb +533 -187
- data/Plugins/OS/Linux/Packages.yaml +20 -1
- data/Plugins/OS/Linux/Services.yaml +8 -0
- data/Plugins/OS/Linux/Shell.rb +70 -0
- data/Plugins/OS/Linux/Syslinux/default +8 -0
- data/Plugins/OS/Linux/WireGuard/WireGuard.lmm.rb +83 -59
- data/Plugins/OS/Linux/WireGuard/wg0.conf.erb +3 -0
- data/Plugins/OS/Linux/openSUSE/autoinst.xml.erb +29 -3
- data/Plugins/OS/Linux/systemd/systemd.lmm.rb +13 -11
- data/Plugins/OS/Routers/Aruba/ArubaInstant.lmm.rb +6 -5
- data/Plugins/Platforms/GitHub.lmm.rb +73 -28
- data/Plugins/Platforms/GoDaddy/GoDaddy.lmm.rb +9 -6
- data/Plugins/Platforms/Proxmox/Proxmox.lmm.rb +402 -0
- data/Plugins/Platforms/Proxmox/XTerm.rb +321 -0
- data/Plugins/Platforms/libvirt/libvirt.lmm.rb +38 -13
- data/Plugins/Platforms/porkbun.lmm.rb +12 -2
- data/Plugins/Platforms/porkbun_spec.rb +2 -2
- data/Plugins/Services/DNS/AmberBit.lmm.rb +1 -1
- data/Plugins/Services/DNS/ArubaItDNS.lmm.rb +1 -1
- data/Plugins/Services/DNS/NICLV.lmm.rb +1 -1
- data/Plugins/Services/DNS/PowerDNS.lmm.rb +70 -68
- data/Plugins/Services/DNS/tonic.lmm.rb +22 -12
- data/lib/ConfigLMM/Framework/plugins/dns.rb +4 -3
- data/lib/ConfigLMM/Framework/plugins/linuxApp.rb +145 -184
- data/lib/ConfigLMM/Framework/plugins/nginxApp.rb +34 -17
- data/lib/ConfigLMM/Framework/plugins/plugin.rb +53 -181
- data/lib/ConfigLMM/Framework/plugins/store.rb +4 -4
- data/lib/ConfigLMM/Framework/variables.rb +75 -0
- data/lib/ConfigLMM/Framework.rb +1 -0
- data/lib/ConfigLMM/cli.rb +12 -6
- data/lib/ConfigLMM/commands/configsCommand.rb +37 -6
- data/lib/ConfigLMM/commands/diff.rb +33 -9
- data/lib/ConfigLMM/context.rb +22 -3
- data/lib/ConfigLMM/io/configList.rb +82 -6
- data/lib/ConfigLMM/io/connection.rb +143 -0
- data/lib/ConfigLMM/io/dhcp.rb +330 -0
- data/lib/ConfigLMM/io/http.rb +78 -0
- data/lib/ConfigLMM/io/local.rb +207 -0
- data/lib/ConfigLMM/io/pxe.rb +92 -0
- data/lib/ConfigLMM/io/ssh.rb +156 -0
- data/lib/ConfigLMM/io/tftp.rb +105 -0
- data/lib/ConfigLMM/io.rb +2 -0
- data/lib/ConfigLMM/secrets/envStore.rb +39 -0
- data/lib/ConfigLMM/secrets/fileStore.rb +43 -0
- data/lib/ConfigLMM/state.rb +2 -1
- data/lib/ConfigLMM/version.rb +2 -1
- data/lib/ConfigLMM.rb +1 -0
- data/{Examples → scripts}/configlmmAuth.sh +7 -5
- metadata +205 -8
@@ -1,13 +1,15 @@
|
|
1
1
|
|
2
2
|
module ConfigLMM
|
3
3
|
module LMM
|
4
|
-
class Matrix < Framework::
|
4
|
+
class Matrix < Framework::Plugin
|
5
5
|
|
6
6
|
USER = 'matrix'
|
7
7
|
HOME_DIR = '/var/lib/matrix'
|
8
8
|
|
9
9
|
def actionMatrixBuild(id, target, state, context, options)
|
10
|
-
|
10
|
+
Nginx.withConnection(local) do |nginxConnection|
|
11
|
+
nginxConnection.writeConfig(__dir__, 'Matrix', target, state, context, options)
|
12
|
+
end
|
11
13
|
end
|
12
14
|
|
13
15
|
def actionMatrixDiff(id, target, activeState, context, options)
|
@@ -19,87 +21,114 @@ module ConfigLMM
|
|
19
21
|
raise Framework::PluginProcessError.new('ServerName field must be set!') unless target['ServerName']
|
20
22
|
|
21
23
|
target['Database'] ||= {}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
self.class.sshExec!(ssh, "su --login #{USER} --shell /bin/sh --command 'mkdir -p ~/data'")
|
33
|
-
|
34
|
-
path = Framework::LinuxApp::SYSTEMD_CONTAINERS_PATH.gsub('~', HOME_DIR)
|
35
|
-
self.class.exec("touch #{path}/Matrix.env", ssh)
|
36
|
-
|
37
|
-
self.class.exec("chown #{USER}:#{USER} #{path}/Matrix.env", ssh)
|
38
|
-
self.class.exec("chmod 600 #{path}/Matrix.env", ssh)
|
39
|
-
|
40
|
-
ssh.scp.upload!(__dir__ + '/homeserver.yaml', HOME_DIR + '/data/')
|
41
|
-
ssh.scp.upload!(__dir__ + '/log.config', HOME_DIR + '/data/')
|
42
|
-
ssh.scp.upload!(__dir__ + '/config.json', HOME_DIR + '/')
|
43
|
-
self.class.exec("chown -R #{USER}:#{USER} #{HOME_DIR}/data", ssh)
|
44
|
-
|
45
|
-
self.class.exec("sed -i 's|$SERVER_NAME|#{target['ServerName']}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
46
|
-
self.class.exec("sed -i 's|$SYNAPSE_DOMAIN|#{target['SynapseDomain'].downcase}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
47
|
-
self.class.exec("sed -i 's|$DB_PASSWORD|#{dbPassword}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
48
|
-
self.class.exec("sed -i 's|$SECRET1|#{SecureRandom.urlsafe_base64(45)}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
49
|
-
self.class.exec("sed -i 's|$SECRET2|#{SecureRandom.urlsafe_base64(45)}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
50
|
-
self.class.exec("sed -i 's|$SECRET3|#{SecureRandom.urlsafe_base64(45)}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
51
|
-
|
52
|
-
self.class.exec("sed -i 's|$SYNAPSE_DOMAIN|#{target['SynapseDomain']}|' #{HOME_DIR}/config.json", ssh)
|
53
|
-
self.class.exec("sed -i 's|$SERVER_NAME|#{target['ServerName']}|' #{HOME_DIR}/config.json", ssh)
|
54
|
-
|
55
|
-
if target['SMTP']
|
56
|
-
host = target['SMTP']['Host']
|
57
|
-
host = HOST_IP if ['localhost', '127.0.0.1'].include?(host)
|
58
|
-
self.class.exec("sed -i 's|smtp_host:.*|smtp_host: #{host}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
59
|
-
self.class.exec("sed -i 's|smtp_port:.*|smtp_port: #{target['SMTP']['Port']}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
60
|
-
self.class.exec("sed -i 's|smtp_user:.*|smtp_user: #{target['SMTP']['Username']}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
61
|
-
self.class.exec("sed -i 's|smtp_pass:.*|smtp_pass: #{ENV['MATRIX_SMTP_PASSWORD']}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
62
|
-
self.class.exec("sed -i 's|notif_from:.*|notif_from: #{target['SMTP']['From']}|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
63
|
-
|
64
|
-
if target['SMTP']['Port'] == 465
|
65
|
-
self.class.exec("sed -i 's|force_tls:.*|force_tls: true|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
66
|
-
end
|
67
|
-
else
|
68
|
-
self.class.exec("sed -i 's|email:|ignore_email:|' #{HOME_DIR}/data/homeserver.yaml", ssh)
|
24
|
+
|
25
|
+
self.withConnection(target['Location'], target) do |connection|
|
26
|
+
Linux.withConnection(connection) do |linuxConnection|
|
27
|
+
target['Database'] ||= {}
|
28
|
+
dbPassword = self.configurePostgreSQL(target['Database'], linuxConnection, options)
|
29
|
+
|
30
|
+
Podman.ensurePresent(linuxConnection, options)
|
31
|
+
Podman.createUser(USER, HOME_DIR, 'Matrix', linuxConnection, options)
|
32
|
+
linuxConnection.withUserShell(USER) do |shell|
|
33
|
+
shell.createDirs(options, '~/data')
|
69
34
|
end
|
70
35
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
36
|
+
path = Podman.containersPath(HOME_DIR)
|
37
|
+
linuxConnection.ensureFile("#{path}/Matrix.env", options)
|
38
|
+
|
39
|
+
linuxConnection.setUserGroup("#{path}/Matrix.env", USER, USER, options)
|
40
|
+
linuxConnection.setPrivate("#{path}/Matrix.env", options)
|
41
|
+
|
42
|
+
homeserver = YAML.load_file(__dir__ + '/homeserver.yaml')
|
43
|
+
configureHomeserver(homeserver, dbPassword, target)
|
44
|
+
homeserverFile = options['output'] + '/homeserver.yaml'
|
45
|
+
File.write(homeserverFile, homeserver.to_yaml)
|
46
|
+
|
47
|
+
linuxConnection.upload(homeserverFile, HOME_DIR + '/data/', options)
|
48
|
+
|
49
|
+
linuxConnection.upload(__dir__ + '/log.config', HOME_DIR + '/data/', options)
|
50
|
+
linuxConnection.upload(__dir__ + '/config.json', HOME_DIR + '/', options)
|
51
|
+
linuxConnection.setUserGroup("#{HOME_DIR}/data", USER, USER, options)
|
52
|
+
|
53
|
+
linuxConnection.fileReplace("#{HOME_DIR}/config.json", '\$SYNAPSE_DOMAIN', target['SynapseDomain'], options)
|
54
|
+
linuxConnection.fileReplace("#{HOME_DIR}/config.json", '\$SERVER_NAME', target['ServerName'], options)
|
55
|
+
|
56
|
+
linuxConnection.upload(__dir__ + '/Synapse.container', path, options)
|
57
|
+
linuxConnection.upload(__dir__ + '/Element.container', path, options)
|
58
|
+
|
59
|
+
linuxConnection.reloadUserServices(USER, options)
|
60
|
+
linuxConnection.restartUserService(USER, 'Synapse', options)
|
61
|
+
linuxConnection.restartUserService(USER, 'Element', options)
|
62
|
+
|
63
|
+
Nginx.withConnection(linuxConnection) do |nginxConnection|
|
64
|
+
nginxConnection.provision(__dir__, 'Matrix', target, activeState, context, options)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def configureHomeserver(homeserver, dbPassword, target)
|
71
|
+
homeserver['server_name'] = target['ServerName']
|
72
|
+
homeserver['public_baseurl'] = "https://#{target['SynapseDomain'].downcase}/"
|
73
|
+
|
74
|
+
homeserver['database']['args']['password'] = dbPassword
|
75
|
+
|
76
|
+
homeserver['registration_shared_secret'] = SecureRandom.urlsafe_base64(45)
|
77
|
+
homeserver['macaroon_secret_key'] = SecureRandom.urlsafe_base64(45)
|
78
|
+
homeserver['form_secret'] = SecureRandom.urlsafe_base64(45)
|
79
|
+
|
80
|
+
if target['SMTP']
|
81
|
+
host = target['SMTP']['Host']
|
82
|
+
host = Podman::HOST_IP if host.to_s.empty? || ['localhost', '127.0.0.1'].include?(host)
|
83
|
+
|
84
|
+
homeserver['email']['smtp_host'] = host
|
85
|
+
if target['SMTP']['Port']
|
86
|
+
homeserver['email']['smtp_port'] = target['SMTP']['Port']
|
87
|
+
end
|
88
|
+
if target['SMTP']['Username']
|
89
|
+
homeserver['email']['smtp_user'] = target['SMTP']['Username']
|
90
|
+
smtpPassword = nil
|
91
|
+
if target['SMTP']['SecretId']
|
92
|
+
smtpPassword = context.secrets.load(target['SMTP']['SecretId'], target['SMTP']['Username'].upcase + '_PASSWORD')
|
78
93
|
end
|
94
|
+
homeserver['email']['smtp_pass'] = smtpPassword if smtpPassword
|
95
|
+
end
|
79
96
|
|
80
|
-
|
81
|
-
ssh.scp.upload!(__dir__ + '/Element.container', path)
|
82
|
-
self.class.exec("systemctl --user --machine=#{USER}@ daemon-reload", ssh)
|
83
|
-
self.class.exec("systemctl --user --machine=#{USER}@ restart Synapse", ssh)
|
84
|
-
self.class.exec("systemctl --user --machine=#{USER}@ restart Element", ssh)
|
97
|
+
homeserver['email']['notif_from'] = target['SMTP']['From']
|
85
98
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
99
|
+
if target['SMTP']['Port'] == 465
|
100
|
+
homeserver['email']['force_tls'] = true
|
101
|
+
end
|
102
|
+
else
|
103
|
+
homeserver.delete('email')
|
104
|
+
end
|
105
|
+
|
106
|
+
if target['OIDC']
|
107
|
+
raise Framework::PluginProcessError.new('OIDC.SecretId must be set!') if target['OIDC']['SecretId'].to_s.empty?
|
108
|
+
|
109
|
+
homeserver['oidc_providers'][0]['issuer'] = target['OIDC']['Issuer']
|
92
110
|
|
111
|
+
clientId = context.secrets.load(target['OIDC']['SecretId'], 'MATRIX_CLIENT_ID')
|
112
|
+
clientSecret = context.secrets.load(target['OIDC']['SecretId'], 'MATRIX_CLIENT_SECRET')
|
113
|
+
|
114
|
+
if !clientId || !clientSecret
|
115
|
+
prompt.say("Secrets #{context.secrets.getID(target['OIDC']['SecretId'], 'MATRIX_CLIENT_ID')} and #{context.secrets.getID(target['OIDC']['SecretId'], 'MATRIX_CLIENT_SECRET')} must be set!", :color => :magenta)
|
116
|
+
raise 'Required secrets are missing!'
|
93
117
|
end
|
118
|
+
|
119
|
+
homeserver['oidc_providers'][0]['client_id'] = clientId
|
120
|
+
homeserver['oidc_providers'][0]['client_secret'] = clientSecret
|
121
|
+
homeserver['password_config']['enabled'] = false
|
94
122
|
else
|
95
|
-
|
96
|
-
activeState['Location'] = '@me'
|
123
|
+
homeserver.delete('oidc_providers')
|
97
124
|
end
|
98
125
|
end
|
99
126
|
|
100
|
-
def configurePostgreSQL(
|
127
|
+
def configurePostgreSQL(dbSettings, linuxConnection, options)
|
101
128
|
password = SecureRandom.alphanumeric(20)
|
102
|
-
PostgreSQL.
|
129
|
+
PostgreSQL.withConnection(dbSettings, linuxConnection) do |postgresConnection|
|
130
|
+
postgresConnection.createUserAndDB(USER, password, options)
|
131
|
+
end
|
103
132
|
password
|
104
133
|
end
|
105
134
|
|
@@ -5,13 +5,18 @@ Description=Matrix (Synapse) container
|
|
5
5
|
After=local-fs.target
|
6
6
|
|
7
7
|
[Container]
|
8
|
+
ContainerName=Synapse
|
8
9
|
Image=docker.io/matrixdotorg/synapse:latest
|
9
10
|
EnvironmentFile=/var/lib/matrix/.config/containers/systemd/Matrix.env
|
10
11
|
Network=slirp4netns:allow_host_loopback=true
|
11
12
|
PublishPort=127.0.0.1:8008:8008
|
12
13
|
UserNS=keep-id:uid=991,gid=991
|
13
14
|
Volume=/var/lib/matrix/data:/data
|
15
|
+
LogDriver=journald
|
14
16
|
AutoUpdate=registry
|
15
17
|
|
18
|
+
[Service]
|
19
|
+
Restart=on-failure
|
20
|
+
|
16
21
|
[Install]
|
17
22
|
WantedBy=multi-user.target default.target
|
@@ -31,10 +31,7 @@ server
|
|
31
31
|
|
32
32
|
server_name <%= config['Domain'] %>;
|
33
33
|
|
34
|
-
|
35
|
-
error_log /var/log/nginx/nextcloud.error.log;
|
36
|
-
|
37
|
-
root /usr/share/webapps/nextcloud;
|
34
|
+
root <%= config['Root'] %>;
|
38
35
|
|
39
36
|
include config-lmm/private.conf;
|
40
37
|
include config-lmm/errors.conf;
|
@@ -142,6 +139,8 @@ server
|
|
142
139
|
fastcgi_request_buffering off;
|
143
140
|
|
144
141
|
fastcgi_max_temp_file_size 0;
|
142
|
+
|
143
|
+
fastcgi_hide_header X-Powered-By;
|
145
144
|
}
|
146
145
|
|
147
146
|
# Rule borrowed from `.htaccess`
|
@@ -1,14 +1,16 @@
|
|
1
1
|
|
2
2
|
module ConfigLMM
|
3
3
|
module LMM
|
4
|
-
class Nextcloud < Framework::
|
4
|
+
class Nextcloud < Framework::Plugin
|
5
5
|
|
6
6
|
USER = 'nextcloud'
|
7
7
|
HOME_DIR = '/var/lib/nextcloud'
|
8
8
|
PACKAGE_NAME = 'Nextcloud'
|
9
9
|
|
10
10
|
def actionNextcloudBuild(id, target, state, context, options)
|
11
|
-
|
11
|
+
Nginx.withConnection(local) do |nginxConnection|
|
12
|
+
nginxConnection.writeConfig(__dir__, 'Nextcloud', target, state, context, options)
|
13
|
+
end
|
12
14
|
end
|
13
15
|
|
14
16
|
def actionNextcloudDiff(id, target, activeState, context, options)
|
@@ -16,86 +18,166 @@ module ConfigLMM
|
|
16
18
|
end
|
17
19
|
|
18
20
|
def actionNextcloudDeploy(id, target, activeState, context, options)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
self.class.sshExec!(ssh, addUserCmd, true)
|
28
|
-
self.class.sshExec!(ssh, "mkdir -p /var/log/php/ /var/lib/nextcloud/apps/ /var/lib/nextcloud/data/")
|
29
|
-
self.class.sshExec!(ssh, "touch /var/log/php/nextcloud.errors.log")
|
30
|
-
self.class.sshExec!(ssh, "touch /var/log/php/nextcloud.mail.log")
|
31
|
-
self.class.sshExec!(ssh, "chown #{USER}:#{USER} /var/log/php/nextcloud.errors.log")
|
32
|
-
self.class.sshExec!(ssh, "chown #{USER}:#{USER} /var/log/php/nextcloud.mail.log")
|
33
|
-
PHP_FPM::fixConfigFileOverSSH(distroInfo, ssh)
|
34
|
-
|
35
|
-
webappsDir = PHP_FPM::webappsDir(distroInfo)
|
36
|
-
configDir = webappsDir + 'nextcloud/config/'
|
37
|
-
if !self.class.remoteFilePresent?(configDir + 'config.php', ssh)
|
38
|
-
self.class.uploadNotPresent(__dir__ + '/config.php', configDir, ssh)
|
39
|
-
self.class.sshExec!(ssh, "sed -i \"s|'instanceid' .*|'instanceid' => '#{SecureRandom.alphanumeric(10)}',|\" #{configDir}config.php")
|
40
|
-
self.class.sshExec!(ssh, "touch #{configDir}CAN_INSTALL")
|
41
|
-
self.class.sshExec!(ssh, "sed -i 's|/usr/share/webapps/|#{webappsDir}|' #{configDir}config.php")
|
21
|
+
self.withConnection(target['Location'], target) do |connection|
|
22
|
+
Linux.withConnection(connection) do |linuxConnection|
|
23
|
+
PHP_FPM::deploy(linuxConnection, options)
|
24
|
+
linuxConnection.ensurePackage(PACKAGE_NAME, options)
|
25
|
+
|
26
|
+
Podman.createUser(USER, HOME_DIR, 'Nextcloud', linuxConnection, options)
|
27
|
+
linuxConnection.withUserShell(USER) do |shell|
|
28
|
+
shell.createDirs(options, '~/apps', '~/data')
|
42
29
|
end
|
43
|
-
|
44
|
-
|
30
|
+
linuxConnection.createDirs(options, '/var/log/php')
|
31
|
+
linuxConnection.makeAccessible(HOME_DIR, options)
|
45
32
|
|
46
|
-
|
47
|
-
|
48
|
-
|
33
|
+
webappsDir = nil
|
34
|
+
PHP_FPM.withConnection(linuxConnection) do |phpConnection|
|
35
|
+
webappsDir = phpConnection.webappsDir
|
36
|
+
phpConnection.enableExtension('imagick', options)
|
49
37
|
end
|
50
38
|
|
51
39
|
target['User'] = USER unless target['User']
|
40
|
+
target['Root'] = webappsDir + 'nextcloud'
|
41
|
+
dbPassword = configureDatabase(target, linuxConnection, context, options)
|
42
|
+
|
43
|
+
configDir = webappsDir + 'nextcloud/config/'
|
44
|
+
if !linuxConnection.filePresent?(configDir + 'config.php', options)
|
45
|
+
linuxConnection.fileWrite('/var/log/php/nextcloud.access.json', '', options)
|
46
|
+
linuxConnection.fileWrite('/var/log/php/nextcloud.errors.log', '', options)
|
47
|
+
linuxConnection.fileWrite('/var/log/php/nextcloud.mail.log', '', options)
|
48
|
+
|
49
|
+
linuxConnection.setUserGroup('/var/log/php/nextcloud.access.json', USER, USER, options)
|
50
|
+
linuxConnection.setUserGroup('/var/log/php/nextcloud.errors.log', USER, USER, options)
|
51
|
+
linuxConnection.setUserGroup('/var/log/php/nextcloud.mail.log', USER, USER, options)
|
52
|
+
|
53
|
+
linuxConnection.exec("chmod o-r /var/log/php/nextcloud.access.json /var/log/php/nextcloud.errors.log /var/log/php/nextcloud.mail.log", false, options)
|
54
|
+
|
55
|
+
linuxConnection.upload(__dir__ + '/autoconfig.php', configDir, options)
|
56
|
+
|
57
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'dbuser' .*", "'dbuser' => '#{target['User']}',", options)
|
58
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'dbpass' .*", "'dbpass' => '#{dbPassword}',", { **options, hide: true })
|
59
|
+
|
60
|
+
if target['Database']['HostName'] != 'localhost'
|
61
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'dbhost' .*", "'dbhost' => '#{target['Database']['HostName']}',", options)
|
62
|
+
end
|
63
|
+
|
64
|
+
if target['Admin'].to_h.empty?
|
65
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'adminlogin'", "//'adminlogin'", options)
|
66
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'adminpass'", "//'adminpass'", options)
|
67
|
+
else
|
68
|
+
raise 'Admin.Name missing!' unless target['Admin']['Name']
|
69
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'adminlogin' .*", "'adminlogin' => '#{target['Admin']['Name']}',", options)
|
70
|
+
|
71
|
+
adminPassword = context.secrets.load(target['SecretId'], 'ADMIN_PASSWORD')
|
72
|
+
if adminPassword.nil?
|
73
|
+
adminPassword = SecureRandom.alphanumeric(20)
|
74
|
+
context.secrets.store(target['SecretId'], 'ADMIN_PASSWORD', adminPassword)
|
75
|
+
context.secrets.print("Nextcloud Admin '#{target['Admin']['Name']}' password", adminPassword)
|
76
|
+
end
|
77
|
+
|
78
|
+
linuxConnection.fileReplace("#{configDir}autoconfig.php", "'adminpass' .*", "'adminpass' => '#{adminPassword}',", { **options, hide: true })
|
79
|
+
end
|
80
|
+
|
81
|
+
linuxConnection.upload(__dir__ + '/config.php', configDir, options)
|
82
|
+
linuxConnection.fileReplace("#{configDir}config.php", "'instanceid' .*", "'instanceid' => '#{SecureRandom.alphanumeric(10)}',", options)
|
83
|
+
|
84
|
+
if target['Valkey'].to_h.empty?
|
85
|
+
linuxConnection.fileReplace("#{configDir}config.php", "'memcache.distributed'", "//'memcache.distributed'", options)
|
86
|
+
linuxConnection.fileReplace("#{configDir}config.php", "'memcache.locking'", "//'memcache.locking'", options)
|
87
|
+
else
|
88
|
+
if target['Valkey']['Host']
|
89
|
+
linuxConnection.fileReplace("#{configDir}config.php", "'host' .*", "'host' => '#{target['Valkey']['Host']}',", options)
|
90
|
+
end
|
91
|
+
if target['Valkey']['SecretId']
|
92
|
+
valkeyPassword = context.secrets.load(target['Valkey']['SecretId'], 'VALKEY_PASSWORD')
|
93
|
+
linuxConnection.fileReplace("#{configDir}config.php", "'password' .*", "'password' => '#{valkeyPassword}',", { **options, hide: true })
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
linuxConnection.fileWrite("#{configDir}CAN_INSTALL", '', options)
|
98
|
+
linuxConnection.fileReplace("#{configDir}config.php", '/usr/share/webapps/', webappsDir, options)
|
99
|
+
end
|
100
|
+
linuxConnection.setUserGroup(configDir, USER, USER, options)
|
101
|
+
linuxConnection.setUserGroup('/var/lib/nextcloud', USER, USER, options)
|
102
|
+
|
52
103
|
name = 'nextcloud'
|
53
|
-
|
54
|
-
|
104
|
+
PHP_FPM.withConnection(linuxConnection) do |phpConnection|
|
105
|
+
linuxConnection.updateFile(phpConnection.configDir + name + '.conf', options, false, ';') do |configLines|
|
106
|
+
phpConnection.writeConfig(name, target, configLines)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
linuxConnection.upload(__dir__ + '/nextcloudcron.service', '/etc/systemd/system/', options)
|
111
|
+
linuxConnection.upload(__dir__ + '/nextcloudcron.timer', '/etc/systemd/system/', options)
|
112
|
+
linuxConnection.fileReplace('/etc/systemd/system/nextcloudcron.service', '\$WEBAPPS/', webappsDir, options)
|
113
|
+
|
114
|
+
linuxConnection.reloadServiceManager(options)
|
115
|
+
linuxConnection.startService(PHP_FPM::PHPFPM_SERVICE, options)
|
116
|
+
linuxConnection.ensureServiceAutoStart('nextcloudcron.timer', options)
|
117
|
+
linuxConnection.startService('nextcloudcron.timer', options)
|
118
|
+
|
119
|
+
Nginx.withConnection(linuxConnection) do |nginxConnection|
|
120
|
+
nginxConnection.provision(__dir__, 'Nextcloud', target, activeState, context, options)
|
55
121
|
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
56
125
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
126
|
+
def configureDatabase(target, linuxConnection, context, options)
|
127
|
+
target['Database'] ||= {}
|
128
|
+
|
129
|
+
password = context.secrets.load(target['SecretId'], 'DB_PASSWORD')
|
130
|
+
if password.nil?
|
131
|
+
password = SecureRandom.alphanumeric(20)
|
132
|
+
context.secrets.store(target['SecretId'], 'DB_PASSWORD', password)
|
133
|
+
end
|
134
|
+
|
135
|
+
if !target['Database']['Type'] || target['Database']['Type'] == 'pgsql'
|
136
|
+
PostgreSQL.defaults(target['Database'])
|
137
|
+
PostgreSQL.withConnection(target['Database'], linuxConnection) do |postgresConnection|
|
138
|
+
postgresConnection.createUserAndDB(target['User'], password, options)
|
69
139
|
end
|
70
|
-
else
|
71
|
-
deployNginxConfig(id, target, activeState, context, options)
|
72
|
-
activeState['Location'] = '@me'
|
73
140
|
end
|
74
|
-
|
141
|
+
password
|
75
142
|
end
|
76
143
|
|
77
144
|
def cleanup(configs, state, context, options)
|
78
|
-
cleanupType(:Nextcloud, configs, state, context, options) do |item, id, state, context, options,
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
145
|
+
cleanupType(:Nextcloud, configs, state, context, options) do |item, id, state, context, options, connection|
|
146
|
+
Linux.withConnection(connection) do |linuxConnection|
|
147
|
+
Nginx.withConnection(linuxConnection) do |nginxConnection|
|
148
|
+
nginxConnection.cleanupConfig('Nextcloud', context, options)
|
149
|
+
nginxConnection.reload(options)
|
150
|
+
end
|
151
|
+
linuxConnection.stopService('nextcloudcron.timer', options)
|
152
|
+
|
153
|
+
configDir = nil
|
154
|
+
webappsDir = nil
|
155
|
+
PHP_FPM.withConnection(linuxConnection) do |phpConnection|
|
156
|
+
configDir = phpConnection.configDir
|
157
|
+
webappsDir = phpConnection.webappsDir
|
158
|
+
end
|
159
|
+
|
160
|
+
linuxConnection.rm(configDir + 'nextcloud.conf', options[:dry])
|
161
|
+
linuxConnection.rm('/etc/systemd/system/nextcloudcron.service', options[:dry])
|
162
|
+
linuxConnection.rm('/etc/systemd/system/nextcloudcron.timer', options[:dry])
|
163
|
+
linuxConnection.reloadService(PHP_FPM::PHPFPM_SERVICE, options)
|
164
|
+
linuxConnection.removePackage(PACKAGE_NAME, options)
|
165
|
+
state.item(id)['Status'] = State::STATUS_DELETED unless options[:dry]
|
166
|
+
|
167
|
+
if options[:destroy]
|
168
|
+
linuxConnection.rm(webappsDir + 'nextcloud', options[:dry])
|
169
|
+
item['Config']['Database'] ||= {}
|
170
|
+
if !item['Config']['Database']['Type'] || item['Config']['Database']['Type'] == 'pgsql'
|
171
|
+
PostgreSQL.withConnection(item['Config']['Database'], linuxConnection) do |postgresConnection|
|
172
|
+
postgresConnection.dropUserAndDB(USER, options)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
linuxConnection.deleteUserAndGroup(USER, options)
|
176
|
+
linuxConnection.rm('/var/log/php/nextcloud.access.json', options[:dry])
|
177
|
+
linuxConnection.rm('/var/log/php/nextcloud.errors.log', options[:dry])
|
178
|
+
linuxConnection.rm('/var/log/php/nextcloud.mail.log', options[:dry])
|
179
|
+
state.item(id)['Status'] = State::STATUS_DESTROYED unless options[:dry]
|
91
180
|
end
|
92
|
-
Framework::LinuxApp.deleteUserAndGroup(USER, ssh, options[:dry])
|
93
|
-
rm('/var/log/php/nextcloud.access.log', options[:dry], ssh)
|
94
|
-
rm('/var/log/php/nextcloud.errors.log', options[:dry], ssh)
|
95
|
-
rm('/var/log/php/nextcloud.mail.log', options[:dry], ssh)
|
96
|
-
rm('/var/log/nginx/nextcloud.access.log', options[:dry], ssh)
|
97
|
-
rm('/var/log/nginx/nextcloud.error.log', options[:dry], ssh)
|
98
|
-
state.item(id)['Status'] = State::STATUS_DESTROYED unless options[:dry]
|
99
181
|
end
|
100
182
|
end
|
101
183
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<?php
|
2
|
+
|
3
|
+
$AUTOCONFIG = [
|
4
|
+
'directory' => '/var/lib/nextcloud/data/',
|
5
|
+
'dbtype' => 'pgsql',
|
6
|
+
'dbname' => 'nextcloud',
|
7
|
+
'dbuser' => 'nextcloud',
|
8
|
+
'dbpass' => '',
|
9
|
+
'dbhost' => '127.0.0.1',
|
10
|
+
'dbtableprefix' => 'oc_',
|
11
|
+
'adminlogin' => '',
|
12
|
+
'adminpass' => '',
|
13
|
+
];
|
@@ -14,5 +14,14 @@ $CONFIG = [
|
|
14
14
|
'url' => '/wapps',
|
15
15
|
'writable' => true,
|
16
16
|
],
|
17
|
-
]
|
17
|
+
],
|
18
|
+
'maintenance_window_start' => 2,
|
19
|
+
//'memcache.local' => '\OC\Memcache\APCu',
|
20
|
+
'memcache.distributed' => '\OC\Memcache\Redis',
|
21
|
+
'memcache.locking' => '\OC\Memcache\Redis',
|
22
|
+
'redis' => [
|
23
|
+
'host' => '127.0.0.1',
|
24
|
+
'port' => 6379,
|
25
|
+
'password' => '',
|
26
|
+
],
|
18
27
|
];
|