Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
1ffd9cb9
Commit
1ffd9cb9
authored
7 years ago
by
kaiyou
Browse files
Options
Downloads
Patches
Plain Diff
Support loading application service files from /data/appservices/
parent
107a5c94
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
contrib/docker/README.md
+6
-1
6 additions, 1 deletion
contrib/docker/README.md
contrib/docker/conf/homeserver.yaml
+8
-1
8 additions, 1 deletion
contrib/docker/conf/homeserver.yaml
contrib/docker/start.py
+4
-0
4 additions, 0 deletions
contrib/docker/start.py
with
18 additions
and
2 deletions
contrib/docker/README.md
+
6
−
1
View file @
1ffd9cb9
...
@@ -59,7 +59,12 @@ The image expects a single volume, located at ``/data``, that will hold:
...
@@ -59,7 +59,12 @@ The image expects a single volume, located at ``/data``, that will hold:
*
temporary files during uploads;
*
temporary files during uploads;
*
uploaded media and thumbnails;
*
uploaded media and thumbnails;
*
the SQLite database if you do not configure postgres.
*
the SQLite database if you do not configure postgres;
*
the appservices configuration.
In order to setup an application service, simply create an
``appservices``
directory in the data volume and write the application service Yaml
configuration file there. Multiple application services are supported.
## Environment
## Environment
...
...
This diff is collapsed.
Click to expand it.
contrib/docker/conf/homeserver.yaml
+
8
−
1
View file @
1ffd9cb9
...
@@ -128,7 +128,7 @@ recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
...
@@ -128,7 +128,7 @@ recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
{
%
if SYNAPSE_TURN_URIS %
}
{
%
if SYNAPSE_TURN_URIS %
}
turn_uris
:
turn_uris
:
{
%
for uri in SYNAPSE_TURN_URIS.split('
,
'
)
%}
-
{{
uri
}}
{
%
for uri in SYNAPSE_TURN_URIS.split('
,
'
)
%}
-
"
{{
uri
}}
"
{%
endfor
%}
{%
endfor
%}
turn_shared_secret:
"{{
SYNAPSE_TURN_SECRET
}}"
turn_shared_secret:
"{{
SYNAPSE_TURN_SECRET
}}"
turn_user_lifetime:
"1h"
turn_user_lifetime:
"1h"
...
@@ -167,7 +167,14 @@ room_invite_state_types:
...
@@ -167,7 +167,14 @@ room_invite_state_types:
-
"m.room.avatar"
-
"m.room.avatar"
-
"m.room.name"
-
"m.room.name"
{%
if
SYNAPSE_APPSERVICES
%}
app_service_config_files:
{%
for
appservice
in
SYNAPSE_APPSERVICES
%}
-
"{{
appservice
}}"
{%
endfor
%}
{%
else
%}
app_service_config_files:
[]
app_service_config_files:
[]
{%
endif
%}
macaroon_secret_key:
"{{
SYNAPSE_MACAROON_SECRET_KEY
}}"
macaroon_secret_key:
"{{
SYNAPSE_MACAROON_SECRET_KEY
}}"
expire_access_token:
False
expire_access_token:
False
...
...
This diff is collapsed.
Click to expand it.
contrib/docker/start.py
+
4
−
0
View file @
1ffd9cb9
...
@@ -4,6 +4,7 @@ import jinja2
...
@@ -4,6 +4,7 @@ import jinja2
import
os
import
os
import
sys
import
sys
import
subprocess
import
subprocess
import
glob
convert
=
lambda
src
,
dst
,
environ
:
open
(
dst
,
"
w
"
).
write
(
jinja2
.
Template
(
open
(
src
).
read
()).
render
(
**
environ
))
convert
=
lambda
src
,
dst
,
environ
:
open
(
dst
,
"
w
"
).
write
(
jinja2
.
Template
(
open
(
src
).
read
()).
render
(
**
environ
))
mode
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
None
mode
=
sys
.
argv
[
1
]
if
len
(
sys
.
argv
)
>
1
else
None
...
@@ -26,6 +27,9 @@ for secret in ("SYNAPSE_REGISTRATION_SHARED_SECRET", "SYNAPSE_MACAROON_SECRET_KE
...
@@ -26,6 +27,9 @@ for secret in ("SYNAPSE_REGISTRATION_SHARED_SECRET", "SYNAPSE_MACAROON_SECRET_KE
print
(
"
Generating a random secret for {}
"
.
format
(
secret
))
print
(
"
Generating a random secret for {}
"
.
format
(
secret
))
environ
[
secret
]
=
os
.
urandom
(
32
).
encode
(
"
hex
"
)
environ
[
secret
]
=
os
.
urandom
(
32
).
encode
(
"
hex
"
)
# Load appservices configurations
environ
[
"
SYNAPSE_APPSERVICES
"
]
=
glob
.
glob
(
"
/data/appservices/*.yaml
"
)
# In generate mode, generate a configuration, missing keys, then exit
# In generate mode, generate a configuration, missing keys, then exit
if
mode
==
"
generate
"
:
if
mode
==
"
generate
"
:
os
.
execv
(
"
/usr/local/bin/python
"
,
args
+
[
"
--generate-config
"
])
os
.
execv
(
"
/usr/local/bin/python
"
,
args
+
[
"
--generate-config
"
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment