Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 51436c8

Browse files
authored
Complement test image: capture logs from nginx (#14063)
Have nginx send its logs to stderr/out, so that we can debug #13334.
1 parent 0b037d6 commit 51436c8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

changelog.d/14063.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Complement test image: capture logs from nginx.

docker/Dockerfile-workers

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ FROM matrixdotorg/synapse:$SYNAPSE_VERSION
4040
COPY --from=deps_base /etc/nginx /etc/nginx
4141
RUN rm /etc/nginx/sites-enabled/default
4242
RUN mkdir /var/log/nginx /var/lib/nginx
43-
RUN chown www-data /var/log/nginx /var/lib/nginx
43+
RUN chown www-data /var/lib/nginx
44+
45+
# have nginx log to stderr/out
46+
RUN ln -sf /dev/stdout /var/log/nginx/access.log
47+
RUN ln -sf /dev/stderr /var/log/nginx/error.log
4448

4549
# Copy Synapse worker, nginx and supervisord configuration template files
4650
COPY ./docker/conf-workers/* /conf/

0 commit comments

Comments
 (0)