From 2ac53b9b3d3e010b7016509fae1d1a81d7b1e523 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 15 Sep 2023 12:41:05 -0300 Subject: [PATCH 1/2] add custom directory and persistence --- build-docker-images/wazuh-dashboard/Dockerfile | 4 ++++ single-node/docker-compose.yml | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build-docker-images/wazuh-dashboard/Dockerfile b/build-docker-images/wazuh-dashboard/Dockerfile index 1b95ca88..27ca9865 100644 --- a/build-docker-images/wazuh-dashboard/Dockerfile +++ b/build-docker-images/wazuh-dashboard/Dockerfile @@ -102,6 +102,10 @@ RUN chown 1000:1000 /*.sh # Copy Install dir from builder to current image COPY --from=builder --chown=1000:1000 $INSTALL_DIR $INSTALL_DIR +# Create custom directory +RUN mkdir -p /usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom +RUN chown 1000:1000 /usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom + # Set workdir and user WORKDIR $INSTALL_DIR USER wazuh-dashboard diff --git a/single-node/docker-compose.yml b/single-node/docker-compose.yml index 063cf6d1..92077eb3 100644 --- a/single-node/docker-compose.yml +++ b/single-node/docker-compose.yml @@ -89,8 +89,9 @@ services: - ./config/wazuh_indexer_ssl_certs/wazuh.dashboard-key.pem:/usr/share/wazuh-dashboard/certs/wazuh-dashboard-key.pem - ./config/wazuh_indexer_ssl_certs/root-ca.pem:/usr/share/wazuh-dashboard/certs/root-ca.pem - ./config/wazuh_dashboard/opensearch_dashboards.yml:/usr/share/wazuh-dashboard/config/opensearch_dashboards.yml - - wazuh-dashboard-config:/usr/share/wazuh-dashboard/data/wazuh/config - ./config/wazuh_dashboard/wazuh.yml:/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml + - wazuh-dashboard-config:/usr/share/wazuh-dashboard/data/wazuh/config + - wazuh-dashboard-custom:/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom depends_on: - wazuh.indexer links: @@ -111,3 +112,4 @@ volumes: filebeat_var: wazuh-indexer-data: wazuh-dashboard-config: + wazuh-dashboard-custom: From 37f565bb8aaa21c0d1e96381a82bcc597768b1c5 Mon Sep 17 00:00:00 2001 From: vcerenu Date: Fri, 15 Sep 2023 12:49:32 -0300 Subject: [PATCH 2/2] add custom directory and persistence --- multi-node/docker-compose.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/multi-node/docker-compose.yml b/multi-node/docker-compose.yml index 4fe149a3..a83f36f8 100644 --- a/multi-node/docker-compose.yml +++ b/multi-node/docker-compose.yml @@ -168,8 +168,9 @@ services: - ./config/wazuh_indexer_ssl_certs/wazuh.dashboard-key.pem:/usr/share/wazuh-dashboard/certs/wazuh-dashboard-key.pem - ./config/wazuh_indexer_ssl_certs/root-ca.pem:/usr/share/wazuh-dashboard/certs/root-ca.pem - ./config/wazuh_dashboard/opensearch_dashboards.yml:/usr/share/wazuh-dashboard/config/opensearch_dashboards.yml - - wazuh-dashboard-config:/usr/share/wazuh-dashboard/data/wazuh/config - ./config/wazuh_dashboard/wazuh.yml:/usr/share/wazuh-dashboard/data/wazuh/config/wazuh.yml + - wazuh-dashboard-config:/usr/share/wazuh-dashboard/data/wazuh/config + - wazuh-dashboard-custom:/usr/share/wazuh-dashboard/plugins/wazuh/public/assets/custom depends_on: - wazuh1.indexer links: @@ -220,3 +221,4 @@ volumes: wazuh-indexer-data-2: wazuh-indexer-data-3: wazuh-dashboard-config: + wazuh-dashboard-custom: