Change to latest tag for Full Text Search (#2563)

This commit is contained in:
Daniel Hansson 2023-09-21 12:31:45 +02:00 committed by GitHub
parent 7059ae3663
commit fc1363713d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 9 deletions

View File

@ -52,9 +52,9 @@ else
done
# Removal Elastichsearch Docker image
docker_prune_this "docker.elastic.co/elasticsearch/elasticsearch"
if docker network ls | grep fulltextsearch_"$DOCKER_IMAGE_NAME"-network
if docker network ls | grep "$FULLTEXTSEARCH_IMAGE_NAME"-network
then
docker network rm fulltextsearch_"$DOCKER_IMAGE_NAME"-network
docker network rm "$FULLTEXTSEARCH_IMAGE_NAME"-network
fi
rm -rf "$FULLTEXTSEARCH_DIR"
# Show successful uninstall if applicable
@ -115,8 +115,8 @@ cat << YML_DOCKER_COMPOSE > "$FULLTEXTSEARCH_DIR/docker-compose.yaml"
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.9.2
container_name: $DOCKER_IMAGE_NAME
image: docker.elastic.co/elasticsearch/elasticsearch:latest
container_name: $FULLTEXTSEARCH_IMAGE_NAME
restart: always
ports:
- 127.0.0.1:9200:9200
@ -134,12 +134,12 @@ services:
soft: 65536
hard: 65536
networks:
- $DOCKER_IMAGE_NAME-network
- $FULLTEXTSEARCH_IMAGE_NAME-network
volumes:
$DOCKER_IMAGE_NAME-data:
$FULLTEXTSEARCH_IMAGE_NAME-data:
networks:
$DOCKER_IMAGE_NAME-network:
$FULLTEXTSEARCH_IMAGE_NAME-network:
YML_DOCKER_COMPOSE
# Start the docker image
@ -154,7 +154,7 @@ done
# Check logs
print_text_in_color "$ICyan" "Checking logs..."
docker logs "$DOCKER_IMAGE_NAME"
docker logs "$FULLTEXTSEARCH_IMAGE_NAME"
countdown "Waiting a bit more before testing..." "10"

2
lib.sh
View File

@ -174,6 +174,8 @@ APACHE2=/etc/apache2/apache2.conf
fulltextsearch_install() {
NEXTCLOUD_INDEX=$(gen_passwd "$SHUF" '[:lower:]')
ELASTIC_USER_PASSWORD=$(gen_passwd "$SHUF" '[:lower:]')
FULLTEXTSEARCH_IMAGE_NAME=fulltextsearch_es01
# Legacy, changed 2023-09-21
DOCKER_IMAGE_NAME=es01
FULLTEXTSEARCH_DIR="$SCRIPTS"/fulltextsearch
# Legacy

View File

@ -661,7 +661,13 @@ $DOCKER_RUN_OUTPUT"
msg_box "Please consider reinstalling FullTextSearch since you seem to have the old (and not working) implemantation by issuing the uninstall script: sudo bash $SCRIPTS/menu.sh --> Additional Apps --> FullTextSearch"
elif [ -d "$FULLTEXTSEARCH_DIR" ]
then
print_text_in_color "$ICyan" "Full Text Search is version based, to upgrade it, please change the version in $FULLTEXTSEARCH_DIR and run 'docker compose pull && docker compose up -d'. Latest tags are here: https://www.docker.elastic.co/r/elasticsearch and release notes here: https://www.elastic.co/guide/en/elasticsearch/reference/current/release-highlights.html"
# Check if new name standard is set, and only update if it is (since it contains the latest tag)
if grep -rq "$FULLTEXTSEARCH_IMAGE_NAME" "$FULLTEXTSEARCH_DIR/docker-compose.yaml"
then
docker-compose_update "$FULLTEXTSEARCH_IMAGE_NAME" 'Full Text Search' "$FULLTEXTSEARCH_DIR"
else
print_text_in_color "$ICyan" "Full Text Search is version based, to upgrade it, please change the version in $FULLTEXTSEARCH_DIR and run 'docker compose pull && docker compose up -d'. Latest tags are here: https://www.docker.elastic.co/r/elasticsearch and release notes here: https://www.elastic.co/guide/en/elasticsearch/reference/current/release-highlights.html"
fi
fi
fi
# Talk Recording