From c1d929e62b63415b92aebdde118a0a9f9f72b8e4 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Thu, 8 Aug 2024 13:24:01 +0300 Subject: [PATCH] add typesense --- README.md | 4 +++- compose-files/typesense.yml | 14 ++++++++++++++ start_ocean.sh | 6 +++++- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 compose-files/typesense.yml diff --git a/README.md b/README.md index f33a51b..9e7ba7a 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ The default versions are always a combination of component versions which are co | ocean-contracts | | v2.0.2 | 172.15.0.14 | | | Aquarius | | v5.1.4 | 172.15.0.5 | 5000 -> 5000 | | Elasticsearch | Aquarius | 8.5.1 | 172.15.0.6 | | +| Typesense | Ocean-node | 0.25.1 | 172.15.0.20 | 8108 -> 8108 | | Provider | | v2.1.6 | 172.15.0.4 | 8030 -> 8030 | | Provider2 | | v2.1.6 | 172.15.0.7 | 8030 -> 8030 | | RBAC Server | | main | 172.15.0.8 | 3000 -> 3000 | @@ -155,7 +156,8 @@ export AQUARIUS_LOG_LEVEL=DEBUG | Option | Description | | -------------------------- | ----------------------------------------------------------------------------------------------- | | `--no-aquarius` | Start up Ocean without the `aquarius` Building Block. | -| `--no-elasticsearch` | Start up Ocean without the `elasticsearch` Building Block. | +| `--no-elasticsearch` | Start up Ocean without the `elasticsearch` Building Block. | +| `--with-typesense` | Start up Ocean with Typesense | | `--no-provider` | Start up Ocean without the `provider` Building Block. | | `--no-ipfs` | Start up Ocean without the `ipfs` Building Block | | `--with-provider2` | Runs a 2nd provider, on port 8031. This is required for ocean.js/ocean.py integration tests. 2nd Provider will use the same image and parameters (log_level, ipfs gateway, compute gateway, etc) as provider1, but has a different private key | diff --git a/compose-files/typesense.yml b/compose-files/typesense.yml new file mode 100644 index 0000000..86d3f59 --- /dev/null +++ b/compose-files/typesense.yml @@ -0,0 +1,14 @@ +version: '3' +services: + typesense: + image: typesense/typesense:${TYPESENSE_VERSION:-latest} + ports: + - 8108:8108 + networks: + backend: + ipv4_address: 172.15.0.20 + volumes: + - typesense-data:/data + command: '--data-dir /data --api-key=xyz' +volumes: + typesense-data: \ No newline at end of file diff --git a/start_ocean.sh b/start_ocean.sh index 980146a..cdcad4d 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -27,7 +27,7 @@ DIR="${DIR/ /\\ }" COMPOSE_DIR="${DIR}/compose-files" # Default versions of Aquarius, Provider - +export TYPESENSE_VERSION=${TYPESENSE_VERSION:-0.25.1} export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v5.1.5} export ELASTICSEARCH_VERSION=${ELASTICSEARCH_VERSION:-8.5.1} export PROVIDER_VERSION=${PROVIDER_VERSION:-v2.1.6} @@ -227,6 +227,10 @@ while :; do COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml" printf $COLOR_Y'Starting with Registry...\n\n'$COLOR_RESET ;; + --with-typesense) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/typesense.yml" + printf $COLOR_Y'Starting with Typesense...\n\n'$COLOR_RESET + ;; --with-c2d) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/registry.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/ipfs.yml"