forked from wazuh/wazuh-docker
Removed config.sh file from wazuh dashboard
This commit is contained in:
@@ -27,10 +27,6 @@ RUN mkdir -p $INSTALL_DIR/data/wazuh/logs && chmod -R 775 $INSTALL_DIR/data/wazu
|
||||
RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/bin/node
|
||||
RUN setcap 'cap_net_bind_service=-ep' /usr/share/wazuh-dashboard/node/fallback/bin/node
|
||||
|
||||
# Generate certificates
|
||||
COPY config/config.sh .
|
||||
RUN bash config.sh
|
||||
|
||||
################################################################################
|
||||
# Build stage 1 (the current Wazuh dashboard image):
|
||||
#
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# Wazuh Docker Copyright (C) 2017, Wazuh Inc. (License GPLv2)
|
||||
# This has to be exported to make some magic below work.
|
||||
export DH_OPTIONS
|
||||
|
||||
export NAME=wazuh-dashboard
|
||||
export INSTALLATION_DIR=/usr/share/${NAME}
|
||||
export CONFIG_DIR=${INSTALLATION_DIR}/config
|
||||
|
||||
# Modify opensearch_dashboards.yml config paths
|
||||
if [ -d "/etc/wazuh-dashboard" ]; then
|
||||
mkdir -p ${CONFIG_DIR}
|
||||
mkdir -p ${CONFIG_DIR}/certs
|
||||
mv /etc/wazuh-dashboard/* ${CONFIG_DIR}/
|
||||
rmdir /etc/wazuh-dashboard
|
||||
fi
|
||||
sed -i "s|/etc/wazuh-dashboard|${CONFIG_DIR}|g" ${CONFIG_DIR}/opensearch_dashboards.yml
|
||||
@@ -6,9 +6,23 @@ wazuh_port="${API_PORT:-55000}"
|
||||
api_username="${API_USERNAME:-wazuh-wui}"
|
||||
api_password="${API_PASSWORD:-wazuh-wui}"
|
||||
api_run_as="${RUN_AS:-false}"
|
||||
export DH_OPTIONS
|
||||
|
||||
export NAME=wazuh-dashboard
|
||||
export INSTALLATION_DIR=/usr/share/${NAME}
|
||||
export CONFIG_DIR=${INSTALLATION_DIR}/config
|
||||
|
||||
dashboard_config_file="/usr/share/wazuh-dashboard/config/opensearch_dashboards.yml"
|
||||
|
||||
# Modify opensearch_dashboards.yml config paths
|
||||
if [ -d "/etc/wazuh-dashboard" ]; then
|
||||
mkdir -p ${CONFIG_DIR}
|
||||
mkdir -p ${CONFIG_DIR}/certs
|
||||
mv /etc/wazuh-dashboard/* ${CONFIG_DIR}/
|
||||
rmdir /etc/wazuh-dashboard
|
||||
fi
|
||||
sed -i "s|/etc/wazuh-dashboard|${CONFIG_DIR}|g" ${CONFIG_DIR}/opensearch_dashboards.yml
|
||||
|
||||
declare -A CONFIG_MAP=(
|
||||
[pattern]=$PATTERN
|
||||
[checks.pattern]=$CHECKS_PATTERN
|
||||
|
||||
Reference in New Issue
Block a user