New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cli option to use settings from env variables #7160
Conversation
3c02f2e
to
1b2ef7f
Compare
Can you please explain how this will work? |
Sure thing! The idea is to be able to replace the work done by the docker scripts (see https://github.com/CollaboraOnline/online/blob/master/docker/from-packages/scripts/start-collabora-online.sh) directly in wsd... if test -n "${username}"; then
perl -pi -e "s/<username (.*)>.*<\/username>/<username \1>${username}<\/username>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${password}"; then
perl -pi -e "s/<password (.*)>.*<\/password>/<password \1>${password}<\/password>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${server_name}"; then
perl -pi -e "s/<server_name (.*)>.*<\/server_name>/<server_name \1>${server_name}<\/server_name>/" /etc/coolwsd/coolwsd.xml
fi
if test -n "${dictionaries}"; then
perl -pi -e "s/<allowed_languages (.*)>.*<\/allowed_languages>/<allowed_languages \1>${dictionaries:-de_DE en_GB en_US es_ES fr_FR it nl pt_BR pt_PT ru}<\/allowed_languages>/" /etc/coolwsd/coolwsd.xml
fi This will let us remove those scripts entirely from docker, but we still want to keep the ability to add settings from environment variables because it makes configuring docker easier. The idea here is to add an extra option ( |
1b2ef7f
to
ec2f94a
Compare
Thanks, just one more. Will you update documentation? |
61202ca
to
23551fa
Compare
thanks for the reminder! I've updated the manpage to add the new option now. I'd like to edit https://sdk.collaboraonline.com too but I don't know where the source to that is... do you? |
No, but I guess @thebearon knows. |
f9dbec6
to
23551fa
Compare
23551fa
to
7459122
Compare
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.
- remoteconfigurl is missing
- domain is missing (although it was deprecated by alias_groupX so probably we can skip it)
Currently [in docker it is possible to do configuration through environment variables](https://col.la/dockercodeconfigviaenv), which works using the start-collabora-online.sh start-collabora-online.pl scripts. This commit lets COOLWSD listen to the same environment variables directly Change-Id: I75762ad620132037523fa82167a3ff17075c7027 Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
7459122
to
f011240
Compare
I added remoteconfigurl. |
Change-Id: I75762ad620132037523fa82167a3ff17075c7027
Summary
Currently in docker it is possible to do configuration through
environment variables, which
works using the start-collabora-online.sh start-collabora-online.pl
scripts. This PR lets COOLWSD listen to the same environment
variables directly
TODO
Checklist
make check
make run
and manually verified that everything looks okay