From 4cc8e92f952bad2093d8f815ce891a4a1d6026cb Mon Sep 17 00:00:00 2001 From: Rishi Ghan Date: Tue, 9 Nov 2021 21:48:52 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=A2=20Added=20elasticsearch=20to=20the?= =?UTF-8?q?=20docker-compose=20stack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 57 +++++++++++++++++++ .../components/AirDCPPConnectionForm.tsx | 42 ++++++++++++++ src/client/components/Settings.tsx | 11 +--- 3 files changed, 101 insertions(+), 9 deletions(-) create mode 100644 src/client/components/AirDCPPConnectionForm.tsx diff --git a/docker-compose.yml b/docker-compose.yml index 4d5f3cb..4d4aa5c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,6 +158,61 @@ services: ports: - "6379:6379" + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:{version} + restart: unless-stopped + environment: + - "discovery.type=single-node" + - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - "xpack.security.enabled=true" + - "xpack.security.authc.api_key.enabled=true" + - "ELASTIC_PASSWORD=changeme" + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - elasticsearch:/usr/share/elasticsearch/data + ports: + - 127.0.0.1:9200:9200 + networks: + - proxy + + ent-search: + image: docker.elastic.co/enterprise-search/enterprise-search:{version} + restart: unless-stopped + depends_on: + - "elasticsearch" + environment: + - "JAVA_OPTS=-Xms512m -Xmx512m" + - "ENT_SEARCH_DEFAULT_PASSWORD=changeme" + - "elasticsearch.username=elastic" + - "elasticsearch.password=changeme" + - "elasticsearch.host=http://elasticsearch:9200" + - "allow_es_settings_modification=true" + - "secret_management.encryption_keys=[4a2cd3f81d39bf28738c10db0ca782095ffac07279561809eecc722e0c20eb09]" + - "elasticsearch.startup_retry.interval=15" + ports: + - 127.0.0.1:3002:3002 + networks: + - proxy + + kibana: + image: docker.elastic.co/kibana/kibana:{version} + restart: unless-stopped + depends_on: + - "elasticsearch" + - "ent-search" + ports: + - 127.0.0.1:5601:5601 + environment: + ELASTICSEARCH_HOSTS: http://elasticsearch:9200 + ENTERPRISESEARCH_HOST: http://ent-search:3002 + ELASTICSEARCH_USERNAME: elastic + ELASTICSEARCH_PASSWORD: changeme + networks: + - proxy + traefik: image: traefik:2.3.4 restart: unless-stopped @@ -191,4 +246,6 @@ networks: volumes: mongodb_data: driver: local + elasticsearch: + driver: local diff --git a/src/client/components/AirDCPPConnectionForm.tsx b/src/client/components/AirDCPPConnectionForm.tsx new file mode 100644 index 0000000..888b2bd --- /dev/null +++ b/src/client/components/AirDCPPConnectionForm.tsx @@ -0,0 +1,42 @@ +import React, { ReactElement } from "react"; +import { Form, Field } from "react-final-form"; + +export const AirDCPPConnectionForm = (): ReactElement => { + const onSubmit = () => {}; + const validate = async () => {}; + + return ( +
( + +

+

AirDC++ Connection Settings

+
+ Configure AirDC++ connection settings such as hostname and + credentials +
+

+
+ +
+ +
+
+ + +
+ )} + /> + ); +}; + +export default AirDCPPConnectionForm; diff --git a/src/client/components/Settings.tsx b/src/client/components/Settings.tsx index 8086203..10c99fe 100644 --- a/src/client/components/Settings.tsx +++ b/src/client/components/Settings.tsx @@ -1,5 +1,6 @@ import React, { useState, useEffect, useCallback, ReactElement } from "react"; import { AirDCPPSettingsForm } from "./AirDCPPSettingsForm"; +import { AirDCPPConnectionForm } from "./AirDCPPConnectionForm"; import settingsObject from "../constants/settings/settingsMenu.json"; import { isUndefined, map } from "lodash"; @@ -12,15 +13,7 @@ export const Settings = (props: ISettingsProps): ReactElement => { id: "adc-connection", content: ( <> -
-

-

AirDC++ Connection Settings

-
- Configure AirDC++ connection settings such as hostname and - credentials -
-

-
+ ), },