[matrix] create a external DB matrix docker-compose for Task#11990
This commit is contained in:
parent
15b5ee2956
commit
915b48691b
9 changed files with 3122 additions and 0 deletions
7
matrix_extDB/matrix_noDB/.env
Normal file
7
matrix_extDB/matrix_noDB/.env
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
homeServerFQDN=homeServerFQDN.sample.matrix.ungleich.cloud
|
||||||
|
synapseFQDN=synapse.sample.matrix.ungleich.cloud
|
||||||
|
elementWebFQDN=elementWebFQDN.sample.matrix.ungleich.cloud
|
||||||
|
dbuser=synapse
|
||||||
|
dbhost=
|
||||||
|
dbpassword=NEEDTOSETPASSWORD
|
||||||
|
dbname=synapse
|
35
matrix_extDB/matrix_noDB/README.md
Normal file
35
matrix_extDB/matrix_noDB/README.md
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
## Usage and Components
|
||||||
|
|
||||||
|
Note: as of 2023-09-01 this docker-compose is available internally.
|
||||||
|
|
||||||
|
### Versions
|
||||||
|
|
||||||
|
* Element: https://hub.docker.com/r/vectorim/element-web/tags
|
||||||
|
* Synapse: https://hub.docker.com/r/matrixdotorg/synapse/tags
|
||||||
|
|
||||||
|
### Domains / homeserver.yaml and element-config.json
|
||||||
|
|
||||||
|
* synapseFQDN: on which domain the home server is reachable
|
||||||
|
* elementWebFQDN: on which domain element web will be deployed
|
||||||
|
* homeServerFQDN: the "matrix domain" that identifies the users
|
||||||
|
|
||||||
|
### Sample usage
|
||||||
|
|
||||||
|
Setting up matrix for ...
|
||||||
|
|
||||||
|
- the matrix domain "fn.nf"
|
||||||
|
- the homeserver "homeserver.fn.nf"
|
||||||
|
- element web on m.fn.nf
|
||||||
|
|
||||||
|
- set domains via .env
|
||||||
|
|
||||||
|
```
|
||||||
|
homeServerFQDN=homeServerFQDN.sample.matrix.ungleich.cloud
|
||||||
|
synapseFQDN=synapse.sample.matrix.ungleich.cloud
|
||||||
|
elementWebFQDN=elementWebFQDN.sample.matrix.ungleich.cloud
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
35
matrix_extDB/matrix_noDB/docker-compose.yaml
Normal file
35
matrix_extDB/matrix_noDB/docker-compose.yaml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
synapse:
|
||||||
|
image: matrixdotorg/synapse:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
|
||||||
|
- SERVERNAME=${homeServerFQDN}
|
||||||
|
- PUBLICBASEURL=${synapseFQDN}
|
||||||
|
- ELEMENTWEB=${elementWebFQDN}
|
||||||
|
- DBNAME=${dbname}
|
||||||
|
- DBHOST=${dbhost}
|
||||||
|
- DBUSER=${dbuser}
|
||||||
|
- DBPASSWORD=${dbpassword}
|
||||||
|
ports:
|
||||||
|
- "8008:8008/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./synapse:/data
|
||||||
|
entrypoint: sh -c "/data/homeserver.yaml.sh && chmod -R 777 /data && /start.py"
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
|
||||||
|
element:
|
||||||
|
image: vectorim/element-web:latest
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
- SERVERNAME=${homeServerFQDN}
|
||||||
|
- PUBLICBASEURL=${synapseFQDN}
|
||||||
|
- ELEMENTWEB=${elementWebFQDN}
|
||||||
|
volumes:
|
||||||
|
- ./element/config.json.sh:/app/config.json.sh
|
||||||
|
command: sh -c "/app/config.json.sh && nginx -g 'daemon off;'"
|
||||||
|
#entrypoint: /app/config.json.sh
|
||||||
|
ports:
|
||||||
|
- "80:80/tcp"
|
55
matrix_extDB/matrix_noDB/element/config.json.sh
Executable file
55
matrix_extDB/matrix_noDB/element/config.json.sh
Executable file
|
@ -0,0 +1,55 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/docker-entrypoint.sh
|
||||||
|
|
||||||
|
cat << EOF > /app/config.json
|
||||||
|
{
|
||||||
|
"default_server_config": {
|
||||||
|
"m.homeserver": {
|
||||||
|
"base_url": "https://$PUBLICBASEURL",
|
||||||
|
"server_name": "$SERVERNAME"
|
||||||
|
},
|
||||||
|
"m.identity_server": {
|
||||||
|
"base_url": "https://vector.im"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"disable_custom_urls": false,
|
||||||
|
"disable_guests": false,
|
||||||
|
"disable_login_language_selector": false,
|
||||||
|
"disable_3pid_login": false,
|
||||||
|
"brand": "Element",
|
||||||
|
"integrations_ui_url": "https://scalar.vector.im/",
|
||||||
|
"integrations_rest_url": "https://scalar.vector.im/api",
|
||||||
|
"integrations_widgets_urls": [
|
||||||
|
"https://scalar.vector.im/_matrix/integrations/v1",
|
||||||
|
"https://scalar.vector.im/api",
|
||||||
|
"https://scalar-staging.vector.im/_matrix/integrations/v1",
|
||||||
|
"https://scalar-staging.vector.im/api",
|
||||||
|
"https://scalar-staging.riot.im/scalar/api"
|
||||||
|
],
|
||||||
|
"default_country_code": "GB",
|
||||||
|
"show_labs_settings": false,
|
||||||
|
"features": {},
|
||||||
|
"default_federate": true,
|
||||||
|
"default_theme": "light",
|
||||||
|
"room_directory": {
|
||||||
|
"servers": ["matrix.org"]
|
||||||
|
},
|
||||||
|
"enable_presence_by_hs_url": {
|
||||||
|
"https://matrix.org": false,
|
||||||
|
"https://matrix-client.matrix.org": false
|
||||||
|
},
|
||||||
|
"setting_defaults": {
|
||||||
|
"breadcrumbs": true
|
||||||
|
},
|
||||||
|
"jitsi": {
|
||||||
|
"preferred_domain": "meet.element.io"
|
||||||
|
},
|
||||||
|
"element_call": {
|
||||||
|
"url": "https://call.element.io",
|
||||||
|
"participant_limit": 8,
|
||||||
|
"brand": "Element Call"
|
||||||
|
},
|
||||||
|
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
|
||||||
|
}
|
||||||
|
EOF
|
2925
matrix_extDB/matrix_noDB/synapse/homeserver.yaml.sh
Executable file
2925
matrix_extDB/matrix_noDB/synapse/homeserver.yaml.sh
Executable file
File diff suppressed because it is too large
Load diff
33
matrix_extDB/matrix_noDB/synapse/log.yaml
Executable file
33
matrix_extDB/matrix_noDB/synapse/log.yaml
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
version: 1
|
||||||
|
|
||||||
|
formatters:
|
||||||
|
fmt:
|
||||||
|
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
|
||||||
|
|
||||||
|
filters:
|
||||||
|
context:
|
||||||
|
(): synapse.logging.context.LoggingContextFilter
|
||||||
|
request: ""
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
console:
|
||||||
|
class: logging.StreamHandler
|
||||||
|
formatter: fmt
|
||||||
|
filters: [context]
|
||||||
|
|
||||||
|
root:
|
||||||
|
level: INFO
|
||||||
|
handlers: [console] # to use file handler instead, switch to [file]
|
||||||
|
|
||||||
|
loggers:
|
||||||
|
synapse:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
synapse.storage.SQL:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
ldap3:
|
||||||
|
level: INFO
|
||||||
|
|
||||||
|
ldap_auth_provider:
|
||||||
|
level: INFO
|
3
matrix_extDB/postgresql/.env
Normal file
3
matrix_extDB/postgresql/.env
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
dbuser=synapse
|
||||||
|
dbpassword=NEEDTOSETPASSWORD
|
||||||
|
dbname=synapse
|
15
matrix_extDB/postgresql/README.md
Normal file
15
matrix_extDB/postgresql/README.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
## Usage and Components
|
||||||
|
|
||||||
|
Note: as of 2023-09-12 this docker-compose is available internally.
|
||||||
|
|
||||||
|
### Versions
|
||||||
|
|
||||||
|
* Postresql: registry.ipv6.docker.com/library/postgres
|
||||||
|
|
||||||
|
### Sample usage
|
||||||
|
|
||||||
|
Setting up matrix for ...
|
||||||
|
|
||||||
|
```
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
14
matrix_extDB/postgresql/docker-compose.yaml
Normal file
14
matrix_extDB/postgresql/docker-compose.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:14
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5432:5432/tcp"
|
||||||
|
volumes:
|
||||||
|
- ./postgresdata:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=${dbname}
|
||||||
|
- POSTGRES_USER=${dbuser}
|
||||||
|
- POSTGRES_PASSWORD=${dbpassword}
|
||||||
|
- POSTGRES_INITDB_ARGS=--encoding=UTF-8 --lc-collate=C --lc-ctype=C
|
Loading…
Reference in a new issue