mirror of
https://github.com/element-hq/synapse.git
synced 2025-04-08 21:53:59 +00:00
Merge 8852fc711d
into 3c188231c7
This commit is contained in:
commit
393f541aa1
4 changed files with 7 additions and 3 deletions
1
changelog.d/18295.docker
Normal file
1
changelog.d/18295.docker
Normal file
|
@ -0,0 +1 @@
|
|||
When generating container scripts from templates, don't add a leading newline so that their shebangs may be handled correctly.
|
|
@ -65,4 +65,4 @@ FROM $FROM
|
|||
# Replace the healthcheck with one which checks *all* the workers. The script
|
||||
# is generated by configure_workers_and_start.py.
|
||||
HEALTHCHECK --start-period=5s --interval=15s --timeout=5s \
|
||||
CMD /bin/sh /healthcheck.sh
|
||||
CMD ["/healthcheck.sh"]
|
||||
|
|
|
@ -58,4 +58,4 @@ ENTRYPOINT ["/start_for_complement.sh"]
|
|||
|
||||
# Update the healthcheck to have a shorter check interval
|
||||
HEALTHCHECK --start-period=5s --interval=1s --timeout=1s \
|
||||
CMD /bin/sh /healthcheck.sh
|
||||
CMD ["/healthcheck.sh"]
|
||||
|
|
|
@ -376,9 +376,11 @@ def convert(src: str, dst: str, **template_vars: object) -> None:
|
|||
#
|
||||
# We use append mode in case the files have already been written to by something else
|
||||
# (for instance, as part of the instructions in a dockerfile).
|
||||
exists = os.path.isfile(dst)
|
||||
with open(dst, "a") as outfile:
|
||||
# In case the existing file doesn't end with a newline
|
||||
outfile.write("\n")
|
||||
if exists:
|
||||
outfile.write("\n")
|
||||
|
||||
outfile.write(rendered)
|
||||
|
||||
|
@ -998,6 +1000,7 @@ def generate_worker_files(
|
|||
"/healthcheck.sh",
|
||||
healthcheck_urls=healthcheck_urls,
|
||||
)
|
||||
os.chmod("/healthcheck.sh", 0o755)
|
||||
|
||||
# Ensure the logging directory exists
|
||||
log_dir = data_dir + "/logs"
|
||||
|
|
Loading…
Add table
Reference in a new issue