This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix handling of SYNAPSE_NO_TLS in docker image #5005
Merged
richvdh
merged 13 commits into
matrix-org:develop
from
f35f0ef9d0e827dae86552d3899f78fc:fix4663
Apr 25, 2019
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b71315f
Correct default POSTGRES_USER
f35f0ef9d0e827dae86552d3899f78fc 3109620
Add changelog file
f35f0ef9d0e827dae86552d3899f78fc ceeae4d
Fixing #4663
f35f0ef9d0e827dae86552d3899f78fc ccaa32c
Updated changelog
f35f0ef9d0e827dae86552d3899f78fc d1cde29
Revert "Updated changelog"
f35f0ef9d0e827dae86552d3899f78fc 10fd0af
Revert "Fixing #4663"
f35f0ef9d0e827dae86552d3899f78fc 926c716
Fixing 4663
f35f0ef9d0e827dae86552d3899f78fc 148ef7f
Slight SYNAPSE_NO_TLS README adjustment
f35f0ef9d0e827dae86552d3899f78fc ff559c1
Add 5005 changelog file
f35f0ef9d0e827dae86552d3899f78fc d9b1b7e
Revert "Correct default POSTGRES_USER"
f35f0ef9d0e827dae86552d3899f78fc c588f41
Revert "Add changelog file"
f35f0ef9d0e827dae86552d3899f78fc 182e46c
Added error for unrecognized SYNAPSE_NO_TLS value.
f35f0ef9d0e827dae86552d3899f78fc 96d2395
README wording tweaks
richvdh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Convert SYNAPSE_NO_TLS Docker variable to boolean for user friendliness. Contributed by Gabriel Eckerson. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,18 @@ def generate_secrets(environ, secrets): | |
if not os.path.exists("/compiled"): os.mkdir("/compiled") | ||
|
||
config_path = "/compiled/homeserver.yaml" | ||
|
||
# Convert SYNAPSE_NO_TLS to boolean if exists | ||
if "SYNAPSE_NO_TLS" in environ: | ||
tlsanswerstring = str.lower(environ["SYNAPSE_NO_TLS"]) | ||
if tlsanswerstring in ("true", "on", "1", "yes"): | ||
environ["SYNAPSE_NO_TLS"] = True | ||
else: | ||
if tlsanswerstring in ("false", "off", "0", "no"): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would have been nice to use |
||
environ["SYNAPSE_NO_TLS"] = False | ||
else: | ||
print("Environment variable \"SYNAPSE_NO_TLS\" found but value \"" + tlsanswerstring + "\" unrecognized; exiting.") | ||
sys.exit(2) | ||
|
||
convert("/conf/homeserver.yaml", config_path, environ) | ||
convert("/conf/log.config", "/compiled/log.config", environ) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might have been nice to write
tlsanswerstring = str.lower(environ.get("SYNAPSE_NO_TLS", "false"))
here, to avoid theif
condition above.