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

Commit

Permalink
Dockerfile-workers: spell out when config isn't generated (#15186)
Browse files Browse the repository at this point in the history
* Complement: Spell out when config isn't generated

* Changelog
  • Loading branch information
David Robertson committed Mar 2, 2023
1 parent 8ef324e commit c4f4dc3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/15186.docker
@@ -0,0 +1 @@
Improve startup logging in the with-workers Docker image.
6 changes: 5 additions & 1 deletion docker/configure_workers_and_start.py
Expand Up @@ -675,17 +675,21 @@ def main(args: List[str], environ: MutableMapping[str, str]) -> None:
if not os.path.exists(config_path):
log("Generating base homeserver config")
generate_base_homeserver_config()

else:
log("Base homeserver config exists—not regenerating")
# This script may be run multiple times (mostly by Complement, see note at top of file).
# Don't re-configure workers in this instance.
mark_filepath = "/conf/workers_have_been_configured"
if not os.path.exists(mark_filepath):
# Always regenerate all other config files
log("Generating worker config files")
generate_worker_files(environ, config_path, data_dir)

# Mark workers as being configured
with open(mark_filepath, "w") as f:
f.write("")
else:
log("Worker config exists—not regenerating")

# Lifted right out of start.py
jemallocpath = "/usr/lib/%s-linux-gnu/libjemalloc.so.2" % (platform.machine(),)
Expand Down

0 comments on commit c4f4dc3

Please sign in to comment.