mauro 1 rok temu
rodzic
commit
9c6135955e

+ 13 - 0
default/pgadmin/servers.json

@@ -0,0 +1,13 @@
+{
+    "Servers": {
+      "1": {
+        "Name": "Dev Stack PostgresSQL",
+        "Group": "Servers",
+        "Port": 5432,
+        "Username": "dev-stack-admin",
+        "Host": "postgres",
+        "SSLMode": "prefer",
+        "MaintenanceDB": "main"
+      }
+    }
+  }

+ 21 - 0
default/postgres/create-multiple-postgresql-databases.sh

@@ -0,0 +1,21 @@
+#!/bin/bash
+
+set -e
+set -u
+
+function create_database() {
+	local database=$1
+	echo "  Creating database '$database' for user '$POSTGRES_USER'"
+	psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "postgres" <<-EOSQL
+	    CREATE DATABASE "$database";
+	    GRANT ALL PRIVILEGES ON DATABASE "$database" TO "$POSTGRES_USER";
+EOSQL
+}
+
+if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then
+	echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES"
+	for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do
+		create_database $db
+	done
+	echo "Multiple databases created"
+fi

+ 42 - 0
default/synapse-matrix-data/homeserver.yaml

@@ -0,0 +1,42 @@
+# Configuration file for Synapse.
+#
+# This is a YAML file: see [1] for a quick introduction. Note in particular
+# that *indentation is important*: all the elements of a list or dictionary
+# should have the same indentation.
+#
+# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
+#
+# For more information on how to configure Synapse, including a complete accounting of
+# each option, go to docs/usage/configuration/config_documentation.md or
+# https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html
+server_name: "matrix.dev-stack.local"
+pid_file: /data/homeserver.pid
+listeners:
+  - port: 8008
+    tls: false
+    type: http
+    x_forwarded: true
+    resources:
+      - names: [client, federation]
+        compress: false
+database:
+  name: psycopg2
+  args:
+    user: dev-stack-admin
+    password: 123DevStack!
+    database: synapse-matrix-db
+    host: postgres # The service name defined in your docker-compose file
+    cp_min: 5
+    cp_max: 10
+log_config: "/data/matrix.dev-stack.local.log.config"
+media_store_path: /data/media_store
+registration_shared_secret: "7:c1tSY0OTzZ.Nay6H+ncxV6~ha8aD:zOSp8hZA@4ehkVhbKMj"
+report_stats: false
+macaroon_secret_key: "ovCnBuM&-*d0~U-T3nqQxr+wm^8iZuNj^u1iwxqj;hZ=;KkQGo"
+form_secret: "K2^=ErkWpF#9t&=@H*fPece2KZUx#2GzPaI.ESf#N@Vy.Yq&=k"
+signing_key_path: "/data/matrix.dev-stack.local.signing.key"
+trusted_key_servers:
+  - server_name: "matrix.org"
+
+
+# vim:ft=yaml

+ 39 - 0
default/synapse-matrix-data/matrix.dev-stack.local.log.config

@@ -0,0 +1,39 @@
+version: 1
+
+formatters:
+  precise:
+    
+    format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
+    
+
+handlers:
+
+
+  console:
+    class: logging.StreamHandler
+    formatter: precise
+
+loggers:
+    # This is just here so we can leave `loggers` in the config regardless of whether
+    # we configure other loggers below (avoid empty yaml dict error).
+    _placeholder:
+        level: "INFO"
+
+    
+    
+    synapse.storage.SQL:
+        # beware: increasing this to DEBUG will make synapse log sensitive
+        # information such as access tokens.
+        level: INFO
+    
+
+    
+
+root:
+    level: INFO
+
+
+    handlers: [console]
+
+
+disable_existing_loggers: false

+ 1 - 0
default/synapse-matrix-data/matrix.dev-stack.local.signing.key

@@ -0,0 +1 @@
+ed25519 a_yjbL tzMVct4J95P2bdPuzYteXYe2UnT/F/NlJLukQAnphS0