Move dev/ things to development
This commit is contained in:
parent
79020115f1
commit
e3923b28b8
72 changed files with 0 additions and 0 deletions
55
development/matrix_extDB/matrix_noDB_redis/element/config.json.sh
Executable file
55
development/matrix_extDB/matrix_noDB_redis/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
|
||||
30
development/matrix_extDB/matrix_noDB_redis/element/element.conf.sh
Executable file
30
development/matrix_extDB/matrix_noDB_redis/element/element.conf.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
cat << EOF > /etc/nginx/conf.d/element.conf
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name $ELEMENTWEB;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/$ELEMENTWEB/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/$ELEMENTWEB/privkey.pem;
|
||||
|
||||
client_max_body_size 512m;
|
||||
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
proxy_set_header Host \$http_host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Content-Security-Policy "frame-ancestors 'none'";
|
||||
|
||||
proxy_pass http://localhost:8080;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
31
development/matrix_extDB/matrix_noDB_redis/element/redirector.conf.sh
Executable file
31
development/matrix_extDB/matrix_noDB_redis/element/redirector.conf.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
cat << EOF > /etc/nginx/conf.d/redirector.conf
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/$SERVERNAME/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/$SERVERNAME/privkey.pem;
|
||||
|
||||
server_name $SERVERNAME;
|
||||
proxy_buffering off;
|
||||
|
||||
|
||||
location /.well-known/matrix/server {
|
||||
default_type application/json;
|
||||
return 200 '{"m.server": "$PUBLICBASEURL:443" }';
|
||||
}
|
||||
location /.well-known/matrix/client {
|
||||
default_type application/json;
|
||||
return 200 '{ "m.homeserver": { "base_url": "https://$PUBLICBASEURL" } }';
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_buffering off;
|
||||
client_max_body_size 512M;
|
||||
return 301 https://$ELEMENTWEB;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
145
development/matrix_extDB/matrix_noDB_redis/element/synapse.conf.sh
Executable file
145
development/matrix_extDB/matrix_noDB_redis/element/synapse.conf.sh
Executable file
|
|
@ -0,0 +1,145 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
cat << EOF > /etc/nginx/conf.d/synapse.conf
|
||||
upstream synapse_master {
|
||||
server localhost:8008;
|
||||
}
|
||||
|
||||
upstream synapse_federation {
|
||||
server localhost:8082;
|
||||
}
|
||||
|
||||
upstream synapse_generic {
|
||||
server localhost:8081;
|
||||
}
|
||||
|
||||
upstream synapse_generic_sync {
|
||||
server localhost:8083;
|
||||
}
|
||||
|
||||
map \$request_uri \$synapse_backend {
|
||||
default synapse_master;
|
||||
|
||||
# Sync requests
|
||||
~*^/_matrix/client/(r0|v3)/sync\$ synapse_sync;
|
||||
~*^/_matrix/client/(api/v1|r0|v3)/events\$ synapse_sync;
|
||||
~*^/_matrix/client/(api/v1|r0|v3)/initialSync\$ synapse_sync;
|
||||
~*^/_matrix/client/(api/v1|r0|v3)/rooms/[^/]+/initialSync\$ synapse_sync;
|
||||
|
||||
# Federation requests
|
||||
~*^/_matrix/federation/v1/event/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/state/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/state_ids/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/backfill/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/get_missing_events/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/publicRooms synapse_federation;
|
||||
~*^/_matrix/federation/v1/query/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/make_join/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/make_leave/ synapse_federation;
|
||||
~*^/_matrix/federation/(v1|v2)/send_join/ synapse_federation;
|
||||
~*^/_matrix/federation/(v1|v2)/send_leave/ synapse_federation;
|
||||
~*^/_matrix/federation/(v1|v2)/invite/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/event_auth/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/exchange_third_party_invite/ synapse_federation;
|
||||
~*^/_matrix/federation/v1/user/devices/ synapse_federation;
|
||||
~*^/_matrix/key/v2/query synapse_federation;
|
||||
~*^/_matrix/federation/v1/hierarchy/ synapse_federation;
|
||||
|
||||
# Inbound federation transaction request
|
||||
~*^/_matrix/federation/v1/send/ synapse_federation;
|
||||
|
||||
# Client API requests
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/createRoom\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/publicRooms\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/joined_members\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/context/.*\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/members\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state\$ synapse_generic;
|
||||
~*^/_matrix/client/v1/rooms/.*/hierarchy\$ synaspe_generic;
|
||||
~*^/_matrix/client/unstable/org.matrix.msc2716/rooms/.*/batch_send\$ synapse_generic;
|
||||
~*^/_matrix/client/unstable/im.nheko.summary/rooms/.*/summary\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/account/3pid\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/account/whoami\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/devices\$ synapse_generic;
|
||||
~*^/_matrix/client/versions\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/voip/turnServer\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/event/ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/joined_rooms\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/search\$ synapse_generic;
|
||||
|
||||
# Encryption requests
|
||||
~*^/_matrix/client/(r0|v3|unstable)/keys/query\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/keys/changes\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/keys/claim\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/room_keys/ synapse_generic;
|
||||
|
||||
# Registration/login requests
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/login\$ synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/register\$ synapse_generic;
|
||||
~*^/_matrix/client/v1/register/m.login.registration_token/validity\$ synapse_generic;
|
||||
|
||||
# Event sending requests
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/redact synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/send synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/state/ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/rooms/.*/(join|invite|leave|ban|unban|kick)\$ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/join/ synapse_generic;
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/profile/ synapse_generic;
|
||||
|
||||
# Account data requests
|
||||
~*^/_matrix/client/(r0|v3|unstable)/.*/tags synapse_generic;
|
||||
~*^/_matrix/client/(r0|v3|unstable)/.*/account_data synapse_generic;
|
||||
|
||||
# Receipts requests
|
||||
#~*^/_matrix/client/(r0|v3|unstable)/rooms/.*/receipt synapse_generic;
|
||||
#~*^/_matrix/client/(r0|v3|unstable)/rooms/.*/read_markers synapse_generic;
|
||||
|
||||
# Presence requests
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/presence/ synapse_generic;
|
||||
|
||||
# User directory search requests
|
||||
~*^/_matrix/client/(r0|v3|unstable)/user_directory/search\$ synapse_generic;
|
||||
|
||||
# for all SSO providers
|
||||
~*^/_matrix/client/(api/v1|r0|v3|unstable)/login/sso/redirect synapse_generic;
|
||||
~*^/_synapse/client/pick_idp$ synapse_generic;
|
||||
~*^/_synapse/client/pick_username synapse_generic;
|
||||
~*^/_synapse/client/new_user_consent$ synapse_generic;
|
||||
~*^/_synapse/client/sso_register$ synapse_generic;
|
||||
|
||||
# OpenID Connect requests.
|
||||
~*^/_synapse/client/oidc/callback$ synapse_generic;
|
||||
}
|
||||
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/$PUBLICBASEURL/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/$PUBLICBASEURL/privkey.pem;
|
||||
|
||||
server_name $PUBLICBASEURL;
|
||||
|
||||
client_max_body_size 512m;
|
||||
|
||||
error_page 403 404 /403_404.html;
|
||||
location = /403_404.html {
|
||||
default_type application/json;
|
||||
return 200 'You are not authorized to access this page.';
|
||||
}
|
||||
|
||||
location ~ /_matrix|/_synapse {
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
proxy_set_header Host \$http_host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_connect_timeout 3600;
|
||||
proxy_send_timeout 3600;
|
||||
proxy_read_timeout 3600;
|
||||
send_timeout 3600;
|
||||
proxy_pass http://\$synapse_backend;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue