Is there any configurations or method to load custom javascript files before any plugin startup?
Thanks
Joe
Is there any configurations or method to load custom javascript files before any plugin startup?
Thanks
Joe
Hello @Joe_Kuan , yes you can. Essentially in your repo, you can define the steps in your Dockerfile like copying the custom JS or config to your image, running the script and finally starting Kibana.
I have done something similar in my project, though I was using shell script to be executed before actually starting Kibana and Elasticsearch.
The skeleton, if you want JS to be executed during image creation, should look something like:
FROM docker.elastic.co/kibana/kibana:8.6.0
ENV HOME=/opt/app-root/src \
KBN_PATH_CONF=/usr/share/kibana/config \
KIBANA_CONF=/usr/share/kibana/config \
KIBANA_HOME=/usr/share/kibana
USER 0
RUN apt-get install dos2unix
COPY --chown=kibana:kibana install.sh ${HOME}/
RUN dos2unix ${HOME}/*.sh
RUN chmod -R og+x ${HOME}/
RUN ${HOME}/install.sh
USER kibana
if it should be executed at runtime:
FROM docker.elastic.co/kibana/kibana:8.6.0
ENV HOME=/opt/app-root/src \
KBN_PATH_CONF=/usr/share/kibana/config \
KIBANA_CONF=/usr/share/kibana/config \
KIBANA_HOME=/usr/share/kibana
USER 0
RUN apt-get install dos2unix
COPY --chown=kibana:kibana install.sh ${HOME}/
RUN dos2unix ${HOME}/*.sh
RUN chmod -R og+x ${HOME}/
USER kibana
WORKDIR ${HOME}
CMD ["sh", "/opt/app-root/src/install.sh"]
Thanks for the reply. I apologise for not stating my question clearly.
Actually I was looking for a way to include custom javascript files before loading the kibana UI in the browser. I can create a kibana plugin but that is only started after the core plugins are initiated.
Thanks
Joe
I can think of one possibility to fork Kibana repo and make your customizations, build the package and image, deploy and run.
Not sure if there's any other way around to this.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.