diff --git a/apps/dokploy/public/templates/elasticsearch.svg b/apps/dokploy/public/templates/elasticsearch.svg new file mode 100644 index 00000000..b95507cd --- /dev/null +++ b/apps/dokploy/public/templates/elasticsearch.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/apps/dokploy/templates/elastic-search/docker-compose.yml b/apps/dokploy/templates/elastic-search/docker-compose.yml new file mode 100644 index 00000000..929006ff --- /dev/null +++ b/apps/dokploy/templates/elastic-search/docker-compose.yml @@ -0,0 +1,34 @@ +version: '3.8' + +services: + elasticsearch: + image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2 + container_name: elasticsearch + environment: + - discovery.type=single-node + - xpack.security.enabled=false + - bootstrap.memory_lock=true + - ES_JAVA_OPTS=-Xms512m -Xmx512m + ulimits: + memlock: + soft: -1 + hard: -1 + ports: + - "9200" + volumes: + - es_data:/usr/share/elasticsearch/data + + kibana: + image: docker.elastic.co/kibana/kibana:8.10.2 + container_name: kibana + environment: + - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 + ports: + - "5601" + depends_on: + - elasticsearch + +volumes: + es_data: + driver: local + \ No newline at end of file diff --git a/apps/dokploy/templates/elastic-search/index.ts b/apps/dokploy/templates/elastic-search/index.ts new file mode 100644 index 00000000..5a3a31e1 --- /dev/null +++ b/apps/dokploy/templates/elastic-search/index.ts @@ -0,0 +1,28 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + const apiDomain = generateRandomDomain(schema); + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 5601, + serviceName: "kibana", + }, + { + host: apiDomain, + port: 9200, + serviceName: "elasticsearch", + }, + ]; + + return { + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 9aaf1ee0..39243356 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1121,4 +1121,19 @@ export const templates: TemplateData[] = [ tags: ["ai"], load: () => import("./langflow/index").then((m) => m.generate), }, + { + id: "elastic-search", + name: "Elasticsearch", + version: "8.10.2", + description: + "Elasticsearch is an open-source search and analytics engine, used for full-text search and analytics on structured data such as text, web pages, images, and videos.", + logo: "elasticsearch.svg", + links: { + github: "https://github.com/elastic/elasticsearch", + website: "https://www.elastic.co/elasticsearch/", + docs: "https://docs.elastic.co/elasticsearch/", + }, + tags: ["search", "analytics"], + load: () => import("./elastic-search/index").then((m) => m.generate), + }, ];