update paths and user to reflect the debian package scheme
This commit is contained in:
parent
42c846e58d
commit
f978b23d19
10
Dockerfile
10
Dockerfile
@ -2,8 +2,8 @@ FROM registry.gitlab.com/thallian/docker-confd-env:master
|
||||
|
||||
ENV VERSION v0.30.0-rc1
|
||||
|
||||
RUN addgroup -g 2222 synapse
|
||||
RUN adduser -h /var/lib/synapse -u 2222 -D -G synapse synapse
|
||||
RUN addgroup -g 2222 matrix-synapse
|
||||
RUN adduser -h /var/lib/matrix-synapse -u 2222 -D -G matrix-synapse matrix-synapse
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libressl \
|
||||
@ -47,9 +47,9 @@ RUN pip install https://github.com/matrix-org/synapse/tarball/$VERSION
|
||||
|
||||
ADD /rootfs /
|
||||
|
||||
RUN chown -R synapse:synapse /var/lib/synapse
|
||||
ENV HOME /var/lib/synapse
|
||||
RUN chown -R matrix-synapse:matrix-synapse /var/lib/matrix-synapse
|
||||
ENV HOME /var/lib/matrix-synapse
|
||||
|
||||
EXPOSE 8448
|
||||
|
||||
VOLUME /var/lib/synapse/media_store/ /var/lib/synapse/uploads /var/lib/synapse/signing/ /etc/ssl/synapse/
|
||||
VOLUME /var/lib/matrix-synapse/media_store/ /var/lib/matrix-synapse/uploads /var/lib/matrix-synapse/signing/ /etc/ssl/matrix-synapse/
|
||||
|
@ -1,10 +1,10 @@
|
||||
[Synapse](https://github.com/matrix-org/synapse) homeserver for the [matrix](http://matrix.org/) network.
|
||||
|
||||
# Volumes
|
||||
- `/var/lib/synapse/media_store/`
|
||||
- `/var/lib/synapse/signing/`
|
||||
- `/var/lib/synapse/uploads/`
|
||||
- `/etc/ssl/synapse/:ro`: certificates have to be here
|
||||
- `/var/lib/matrix-synapse/media_store/`
|
||||
- `/var/lib/matrix-synapse/signing/`
|
||||
- `/var/lib/matrix-synapse/uploads/`
|
||||
- `/etc/ssl/matrix-synapse/:ro`: certificates have to be here
|
||||
|
||||
# Environment Variables
|
||||
## SERVER_NAME
|
||||
|
@ -1,6 +1,6 @@
|
||||
[template]
|
||||
src = "server.yaml.tmpl"
|
||||
dest = "/var/lib/synapse/server.yaml"
|
||||
dest = "/var/lib/matrix-synapse/server.yaml"
|
||||
uid = 2222
|
||||
gid = 2222
|
||||
mode = "0644"
|
||||
|
@ -1,11 +1,11 @@
|
||||
tls_certificate_path: "/etc/ssl/synapse/{{getenv "CERT_NAME" "fullchain.pem"}}"
|
||||
tls_private_key_path: "/etc/ssl/synapse/{{getenv "KEY_NAME" "privkey.pem"}}"
|
||||
tls_dh_params_path: "/var/lib/synapse/signing/dhparams.pem"
|
||||
tls_certificate_path: "/etc/ssl/matrix-synapse/{{getenv "CERT_NAME" "fullchain.pem"}}"
|
||||
tls_private_key_path: "/etc/ssl/matrix-synapse/{{getenv "KEY_NAME" "privkey.pem"}}"
|
||||
tls_dh_params_path: "/var/lib/matrix-synapse/signing/dhparams.pem"
|
||||
no_tls: False
|
||||
|
||||
server_name: "{{getenv "SERVER_NAME"}}"
|
||||
|
||||
pid_file: /var/lib/synapse/homeserver.pid
|
||||
pid_file: /var/lib/matrix-synapse/homeserver.pid
|
||||
|
||||
web_client: True
|
||||
public_baseurl: {{getenv "PUBLIC_BASE_URL"}}
|
||||
@ -54,8 +54,8 @@ database:
|
||||
event_cache_size: "10K"
|
||||
|
||||
verbose: 0
|
||||
log_file: "/var/lib/synapse/homeserver.log"
|
||||
log_config: "/var/lib/synapse/log.config"
|
||||
log_file: "/var/lib/matrix-synapse/homeserver.log"
|
||||
log_config: "/var/lib/matrix-synapse/log.config"
|
||||
|
||||
rc_messages_per_second: 0.2
|
||||
rc_message_burst_count: 10.0
|
||||
@ -65,8 +65,8 @@ federation_rc_sleep_delay: 500
|
||||
federation_rc_reject_limit: 50
|
||||
federation_rc_concurrent: 3
|
||||
|
||||
media_store_path: "/var/lib/synapse/media_store"
|
||||
uploads_path: "/var/lib/synapse/uploads"
|
||||
media_store_path: "/var/lib/matrix-synapse/media_store"
|
||||
uploads_path: "/var/lib/matrix-synapse/uploads"
|
||||
max_upload_size: "{{getenv "MAX_UPLOAD_SIZE" "10M"}}"
|
||||
max_image_pixels: "{{getenv "MAX_THUMBNAIL_PIXELS" "32M"}}"
|
||||
dynamic_thumbnails: {{getenv "DYNAMIC_THUMBNAILS" "True"}}
|
||||
@ -118,7 +118,7 @@ app_service_config_files: []
|
||||
macaroon_secret_key: "{{getenv "MACAROON_SECRET_KEY"}}"
|
||||
expire_access_token: False
|
||||
|
||||
signing_key_path: "/var/lib/synapse/signing/signing.key"
|
||||
signing_key_path: "/var/lib/matrix-synapse/signing/signing.key"
|
||||
old_signing_keys: {}
|
||||
|
||||
key_refresh_interval: "1d" # 1 Day.
|
||||
|
@ -1,10 +1,9 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
if [ ! -f /var/lib/synapse/signing/signing.key ]; then
|
||||
source /var/lib/synapse/bin/activate
|
||||
s6-setuidgid synapse python -B -m synapse.app.homeserver -c /var/lib/synapse/server.yaml --generate-config -H $SERVER_NAME --report-stats=no
|
||||
if [ ! -f /var/lib/matrix-synapse/signing/signing.key ]; then
|
||||
s6-setuidgid matrix-synapse python -B -m synapse.app.homeserver -c /var/lib/matrix-synapse/server.yaml --generate-config -H $SERVER_NAME --report-stats=no
|
||||
fi
|
||||
|
||||
if [ ! -f /var/lib/synapse/signing/dhparams.pem ]; then
|
||||
openssl dhparam -out /var/lib/synapse/signing/dhparams.pem $DHPARAM_LENGTH
|
||||
if [ ! -f /var/lib/matrix-synapse/signing/dhparams.pem ]; then
|
||||
openssl dhparam -out /var/lib/matrix-synapse/signing/dhparams.pem $DHPARAM_LENGTH
|
||||
fi
|
||||
|
@ -1,3 +1,3 @@
|
||||
/var/lib/synapse/signing/ true synapse 0640 0750
|
||||
/var/lib/synapse/media_store/ true synapse 0640 0750
|
||||
/var/lib/synapse/uploads true synapse 0640 0750
|
||||
/var/lib/matrix-synapse/signing/ true matrix-synapse 0640 0750
|
||||
/var/lib/matrix-synapse/media_store/ true matrix-synapse 0640 0750
|
||||
/var/lib/matrix-synapse/uploads true matrix-synapse 0640 0750
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/with-contenv sh
|
||||
|
||||
cd /var/lib/synapse
|
||||
s6-setuidgid synapse python -B -m synapse.app.homeserver -c server.yaml
|
||||
cd /var/lib/matrix-synapse
|
||||
s6-setuidgid matrix-synapse python -B -m synapse.app.homeserver -c server.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user