Skip to content
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

option to configure via the environment #21

Open
f1-outsourcing opened this issue Jul 14, 2019 · 0 comments
Open

option to configure via the environment #21

f1-outsourcing opened this issue Jul 14, 2019 · 0 comments

Comments

@f1-outsourcing
Copy link

Since the configuration of the webchat only requires a few variables. It would be nice if we could set them via the environment. This way you will have an easy deployment of a container. Now I have to extract the war file and add a configuration file with something like this

cp webchat-4.2.0.war webchat.war && zip -r webchat.war WEB-INF

With such a file

<chat-settings>
  <serverDomain>${envOpenfireServer}</serverDomain>
  <port>5222</port>
  <sslEnabled>false</sslEnabled>
  <sslPort>-1</sslPort>
</chat-settings>

And something like this in the entrypoint.sh

export JAVA_OPTS="$JAVA_OPTS -DenvHttpPort=$TOMCAT_HTTP_PORT -DenvHttpsPort=$TOMCAT_HTTPS_PORT -DenvShutdown=$TOMCAT_SHUTDOWN -DenvOpenfireServer=$OPENFIRE_SERVER"

I can configure the container with an environment variable setting.

I think you need to enable the java variables for the chat-settings.xml, because the above is not working, while this substitution is working in eg. the tomcat server.xml

Server: ${envOpenfireServer}
Port: 5222
SSL Enabled: false
Test Connection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant