Skip to content

Commit ebb2d63

Browse files
authored
Update to trixie base, and a few other updates (#23)
* Update Dockerfile-unified for trixie, and a few other newer bits * Update complement testing image to trixie * cleanups * sync up complement testing settings
1 parent 1e1222c commit ebb2d63

5 files changed

Lines changed: 60 additions & 33 deletions

File tree

.ci/scripts/complement.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,13 @@ test_packages=(
193193
./tests/msc3874
194194
./tests/msc3890
195195
./tests/msc3391
196+
./tests/msc3757
196197
./tests/msc3930
197198
./tests/msc3902
198199
./tests/msc3967
200+
./tests/msc4140
201+
./tests/msc4155
202+
./tests/msc4306
199203
)
200204
# All environment variables starting with PASS_ will be shared.
201205
# (The prefix is stripped off before reaching the container.)

Dockerfile-unified

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#
2020

2121
ARG SYNAPSE_VERSION=latest
22-
ARG REDIS_VERSION=7.0.8
2322

2423
###
2524
### Stage 2: Add-ons
@@ -41,7 +40,7 @@ ARG REDIS_VERSION=7.0.8
4140
# target image. For repeated rebuilds, this is much faster than apt installing
4241
# each time.
4342

44-
FROM debian:bookworm-slim AS deps_base
43+
FROM debian:trixie-slim AS deps_base
4544
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
4645
--mount=type=cache,target=/var/lib/apt,sharing=locked \
4746
apt-get update -qq && \
@@ -56,11 +55,13 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
5655
# based on the same debian version as the synapse image, to make sure we get
5756
# the expected version of libc.
5857
#
59-
# We will be using the PPA version of keydb until their docker image works for bookworm
60-
# FROM eqalpha/keydb:latest AS redis_base
58+
# A redis compatible image is needed. Previously, keydb was used. The debian based image that was used is not being
59+
# updated any more. Valkey is also redis compatible, and comes highly recommended
60+
FROM bitnami/valkey:latest AS redis_base
6161

6262
# Do the same for the Nginx docker image.
63-
FROM nginx:1.24.0 AS nginx_base
63+
# The first debian-based image based on trixie is for v1.29
64+
FROM nginx:1.29 AS nginx_base
6465

6566
# The synapse auto compressor is from an image we build. It won't change much
6667
# so there's no reason to not have this pre-compiled and just borrow it. This also
@@ -86,7 +87,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
8687
libevent-extra-2.1-7 \
8788
libevent-openssl-2.1-7 \
8889
libevent-pthreads-2.1-7 \
89-
libhiredis0.14 \
90+
libhiredis1.1.0 \
9091
libjemalloc2 \
9192
libjpeg62-turbo \
9293
libmicrohttpd12 \
@@ -101,18 +102,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
101102
xmlsec1 \
102103
&& rm -rf /var/lib/apt/lists/*
103104

104-
# Install keydb from their supplied PPA. Preferably, the docker image would be better,
105-
# but is currently compiled against ubuntu 18.04 which doesn't work with our libssl.
106-
# We specifically get the keydb-tools package, as the others tend to setup service
107-
# entries that are not used(and cause errors).
108-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
109-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
110-
echo "deb https://download.keydb.dev/open-source-dist bookworm main" | tee /etc/apt/sources.list.d/keydb.list && \
111-
wget -O /etc/apt/trusted.gpg.d/keydb.gpg https://download.keydb.dev/open-source-dist/keyring.gpg && \
112-
apt-get update -qq && apt-get install -yqq \
113-
keydb-tools \
114-
&& rm -rf /var/lib/apt/lists/*
115-
116105
# Prepare directories. Do it in one layer
117106
RUN mkdir -p /etc/supervisor/conf.d && \
118107
mkdir /var/log/nginx /var/cache/nginx && \
@@ -124,21 +113,19 @@ RUN mkdir -p /etc/supervisor/conf.d && \
124113
RUN --mount=type=cache,target=/root/.cache/pip \
125114
pip install supervisor~=4.2
126115

127-
# Copy over redis and nginx
128-
# COPY --from=redis_base /usr/local/bin/keydb-server /usr/local/bin
116+
# Copy over valkey and nginx
117+
COPY --from=redis_base /opt/bitnami/valkey/* /opt/bitnami/valkey/
129118

130119
COPY --from=nginx_base /usr/sbin/nginx /usr/sbin
131120
COPY --from=nginx_base /usr/share/nginx /usr/share/nginx
132121
COPY --from=nginx_base /usr/lib/nginx /usr/lib/nginx
133-
COPY --from=nginx_base /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/
122+
# COPY --from=nginx_base /usr/lib/x86_64-linux-gnu/libssl.so.1.1 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 /usr/lib/x86_64-linux-gnu/
134123
COPY --from=nginx_base /etc/nginx /etc/nginx
135124
RUN rm /etc/nginx/conf.d/default.conf
136125

137-
# Copy over Prometheus. Should we bring the website files. It's 10's of MB's
126+
# Copy over Prometheus. Should we bring the website files? It's 10's of MB's
138127
COPY --from=deps_base /usr/bin/prometheus /usr/bin
139-
COPY --from=deps_base /usr/share/prometheus/* /usr/share/prometheus
140-
# And Synapse's Prometheus rule file
141-
COPY /contrib/prometheus/synapse-V2.rules /etc/prometheus
128+
COPY --from=deps_base /usr/share/prometheus/* /usr/share/prometheus/
142129
COPY /contrib/mtail/ /conf/mtail/
143130

144131
COPY --from=tools /out /

complement/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ FROM $FROM
1919
# the same debian version as Synapse's docker image (so the versions of the
2020
# shared libraries match).
2121
RUN adduser --system --uid 999 postgres --home /var/lib/postgresql
22-
COPY --from=postgres:16-bookworm /usr/lib/postgresql /usr/lib/postgresql
23-
COPY --from=postgres:16-bookworm /usr/share/postgresql /usr/share/postgresql
22+
COPY --from=postgres:16-trixie /usr/lib/postgresql /usr/lib/postgresql
23+
COPY --from=postgres:16-trixie /usr/share/postgresql /usr/share/postgresql
24+
COPY --from=postgres:16-trixie /usr/lib/x86_64-linux-gnu/libicu*.so.* /usr/lib/x86_64-linux-gnu/
2425
RUN mkdir /var/run/postgresql && chown postgres /var/run/postgresql
2526
ENV PATH="${PATH}:/usr/lib/postgresql/16/bin"
2627
ENV PGDATA=/var/lib/postgresql/data

complement/conf/workers-shared-extra.yaml.j2

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#}
88

99
## Server ##
10+
public_baseurl: http://127.0.0.1:8008/
1011
report_stats: False
1112
trusted_key_servers: []
1213
enable_registration: true
@@ -46,10 +47,6 @@ rc_registration:
4647
per_second: 9999
4748
burst_count: 9999
4849

49-
rc_registration_token_validity:
50-
per_second: 9999
51-
burst_count: 9999
52-
5350
rc_login:
5451
address:
5552
per_second: 9999
@@ -88,6 +85,22 @@ rc_invites:
8885
per_user:
8986
per_second: 1000
9087
burst_count: 1000
88+
per_issuer:
89+
per_second: 1000
90+
burst_count: 1000
91+
92+
rc_presence:
93+
per_user:
94+
per_second: 9999
95+
burst_count: 9999
96+
97+
rc_delayed_event_mgmt:
98+
per_second: 9999
99+
burst_count: 9999
100+
101+
rc_room_creation:
102+
per_second: 9999
103+
burst_count: 9999
91104

92105
federation_rr_transactions_per_room_per_second: 9999
93106

@@ -108,17 +121,39 @@ experimental_features:
108121
msc3967_enabled: true
109122
# Expose a room summary for public rooms
110123
msc3266_enabled: true
124+
# Send to-device messages to application services
125+
msc2409_to_device_messages_enabled: true
126+
# Allow application services to masquerade devices
127+
msc3202_device_masquerading: true
128+
# Sending device list changes, one-time key counts and fallback key usage to application services
129+
msc3202_transaction_extensions: true
130+
# Proxy OTK claim requests to exclusive ASes
131+
msc3983_appservice_otk_claims: true
132+
# Proxy key queries to exclusive ASes
133+
msc3984_appservice_key_query: true
134+
# Invite filtering
135+
msc4155_enabled: true
136+
# Thread Subscriptions
137+
msc4306_enabled: true
111138

112139
server_notices:
113140
system_mxid_localpart: _server
114141
system_mxid_display_name: "Server Alert"
115142
system_mxid_avatar_url: ""
116143
room_name: "Server Alert"
117144

145+
# Enable delayed events (msc4140)
146+
max_event_delay_duration: 24h
147+
118148

119149
# Disable sync cache so that initial `/sync` requests are up-to-date.
120150
caches:
121151
sync_response_cache_duration: 0
122152

123153

154+
# Complement assumes that it can publish to the room list by default.
155+
room_list_publication_rules:
156+
- action: allow
157+
158+
124159
{% include "shared-orig.yaml.j2" %}

conf-workers/supervisord.conf.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ stderr_logfile_maxbytes=0
1818
username=www-data
1919
autorestart=true
2020

21-
[program:keydb]
22-
command=/usr/local/bin/prefix-log /usr/bin/keydb-server --unixsocket /dev/shm/redis.sock --server-threads 8
21+
[program:valkey]
22+
command=/usr/local/bin/prefix-log /opt/bitnami/valkey/valkey-server --unixsocket /dev/shm/redis.sock --io-threads 2
2323
priority=1
2424
stdout_logfile=/dev/stdout
2525
stdout_logfile_maxbytes=0

0 commit comments

Comments
 (0)