app/matrix: appservice workers

This change extracts appservice workers (deployed and tested) and prepares for
federation sender workers extraction (still partially broken)

Change-Id: I2d63fe44538ea2a7c5fd492f6ce119bc35a9eb03
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1101
Reviewed-by: informatic <informatic@hackerspace.pl>
Reviewed-by: q3k <q3k@hackerspace.pl>
diff --git a/app/matrix/lib/matrix-ng.libsonnet b/app/matrix/lib/matrix-ng.libsonnet
index 1fc07e7..20c33e8 100644
--- a/app/matrix/lib/matrix-ng.libsonnet
+++ b/app/matrix/lib/matrix-ng.libsonnet
@@ -219,6 +219,11 @@
             storageClassName: cfg.storageClassName,
             storageSize: "100Gi",
             initdbArgs: "--encoding='UTF8' --lc-collate='C' --lc-ctype='C'",
+
+            opts: {
+                max_connections: "300",
+                shared_buffers: "80MB",
+            },
         },
     },
 
@@ -228,6 +233,7 @@
             appName: "synapse",
             storageClassName: cfg.storageClassName,
             password: { secretKeyRef: { name: "synapse", key: "redis_password" } },
+            persistence: false,
         },
     },