### Start Fess with MinIO, Ollama, and Dashboards Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Command to start a Fess setup that includes MinIO for storage, Ollama for LLM, and Dashboards. This combines multiple services for a comprehensive setup. ```bash # Create custom compose file for this combination docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-dashboards3.yaml \ -f compose-minio.yaml \ -f compose-ollama.yaml \ up -d ``` -------------------------------- ### Start Fess Services with Docker Compose Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Use these commands to start Fess services with various configurations, including standard setups, with dashboards, multi-instance deployments, and multiple overlay files. ```bash # Standard setup docker compose -f compose.yaml -f compose-opensearch3.yaml up -d ``` ```bash # With dashboards docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-dashboards3.yaml up -d ``` ```bash # Multi-instance cd compose/multi-instance docker compose -f compose.yaml -f compose-fess01.yaml -f compose-fess02.yaml up -d ``` ```bash # With multiple overlay files docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-dashboards3.yaml \ -f compose-minio.yaml \ up -d ``` -------------------------------- ### Start Fess with OpenSearch and Dashboards Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Deploys Fess, OpenSearch, and OpenSearch Dashboards. This setup is useful for visualizing Fess data. ```bash docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-dashboards3.yaml up -d ``` -------------------------------- ### Start Fess with OpenSearch Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Launches Fess and OpenSearch using Docker Compose. Ensure Docker Desktop or Compose V2 is installed. ```bash docker compose -f compose.yaml -f compose-opensearch3.yaml up -d ``` -------------------------------- ### Fess Plugin Installation Failure Log Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Example of an error log message indicating a plugin download failure. Check network, plugin name/version, and Fess logs if this occurs. ```json {"log.level": "ERROR", "message": "Failed to download plugin-name."} ``` -------------------------------- ### Install NVIDIA Container Toolkit Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Installs the NVIDIA Container Toolkit required for GPU acceleration within Docker. Verify the installation using the provided command. ```bash # Install (Ubuntu/Debian) sudo apt-get install nvidia-container-toolkit # Verify docker run --rm --gpus all nvidia/cuda:12.0-runtime nvidia-smi ``` -------------------------------- ### Start Services with Additional Fess Instance Source: https://github.com/codelibs/docker-fess/blob/master/compose/multi-instance/README.md Start all services, including the newly added Fess instance, by including its compose file in the command. ```bash docker compose -f compose.yaml -f compose-fess01.yaml -f compose-fess02.yaml -f compose-fess03.yaml up -d ``` -------------------------------- ### DNS Resolution Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md Example of setting the search engine URL, demonstrating Fess's ability to resolve service hostnames using Docker's internal DNS. ```bash SEARCH_ENGINE_HTTP_URL=http://search01:9200 # search01 resolves via Docker DNS (127.0.0.11:53) ``` -------------------------------- ### Start Fess with Custom Configuration Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md Use this command to start the Fess container with specific search engine settings, JVM heap size, and plugins. Ensure the image tag matches your desired Fess version. ```bash # Start Fess with custom configuration docker run -it \ -e SEARCH_ENGINE_HTTP_URL=http://opensearch:9200 \ -e FESS_HEAP_SIZE=2g \ -e FESS_PLUGINS="fess-webapp-semantic-search:15.7.0" \ ghcr.io/codelibs/fess:15.7.0 ``` -------------------------------- ### Start Fess with OpenSearch using Docker Compose Source: https://github.com/codelibs/docker-fess/blob/master/compose/vanilla/README.md Use this command to start Fess and OpenSearch using the provided Docker Compose files. Ensure you have both `compose.yaml` and `compose-opensearch2.yaml` in your directory. ```bash docker compose -f compose.yaml -f compose-opensearch2.yaml up -d ``` -------------------------------- ### Install Fess Plugins Automatically Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md Specify plugins to be automatically downloaded and installed at Fess startup by setting the FESS_PLUGINS environment variable. Plugins are listed as 'name:version'. ```bash FESS_PLUGINS="fess-webapp-semantic-search:15.7.0 fess-ds-wikipedia:15.7.0" ``` -------------------------------- ### Start Fess with Google Gemini API Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Use this command to start Fess services integrated with Google Gemini API. Ensure the GEMINI_API_KEY environment variable is set. ```bash # Get API key export GEMINI_API_KEY="AIzaSy..." # Start services docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-gemini.yaml \ up -d ``` -------------------------------- ### Start OpenSearch and Fess Services Source: https://github.com/codelibs/docker-fess/blob/master/compose/multi-instance/README.md Start the OpenSearch cluster and two Fess instances using Docker Compose. Ensure all necessary compose files are specified. ```bash docker compose -f compose.yaml -f compose-fess01.yaml -f compose-fess02.yaml up -d ``` -------------------------------- ### Dependency Management Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Specifies that the Fess service depends on the 'search01' service and should only start after 'search01' is healthy. Other condition options include 'service_started' and 'service_completed_successfully'. ```yaml depends_on: search01: condition: service_healthy ``` -------------------------------- ### Start Single-Instance Fess Deployment Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Use this command to start a single instance of Fess with OpenSearch using Docker Compose. Ensure you have the `compose.yaml` and `compose-opensearch3.yaml` files in your current directory. ```bash cd /workspace/docker-fess docker compose -f compose.yaml -f compose-opensearch3.yaml up -d ``` -------------------------------- ### Install Fess Plugins via FESS_PLUGINS Environment Variable Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Specify a space-separated list of plugins and their versions to install Fess extensions. Use SNAPSHOT versions for development. ```bash FESS_PLUGINS="fess-webapp-semantic-search:15.7.0 fess-ds-wikipedia:15.7.0 fess-llm-ollama:15.7.0" ``` ```bash FESS_PLUGINS="fess-webapp-semantic-search:15.8.0-SNAPSHOT" ``` -------------------------------- ### Start Fess Service Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md Initializes Fess by creating necessary log files, setting ownership, and starting the Fess application in the background. Ensure log directories exist before execution. ```bash start_fess() { rm -f /usr/bin/java ln -s /opt/java/openjdk/bin/java /usr/bin/java touch /var/log/fess/fess-crawler.log \ /var/log/fess/fess-llm.log \ /var/log/fess/fess-suggest.log \ /var/log/fess/fess-thumbnail.log \ /var/log/fess/fess-urls.log \ /var/log/fess/audit.log \ /var/log/fess/fess.log chown fess:fess /var/log/fess/fess-crawler.log \ /var/log/fess/fess-llm.log \ /var/log/fess/fess-suggest.log \ /var/log/fess/fess-thumbnail.log \ /var/log/fess/fess-urls.log \ /var/log/fess/audit.log \ /var/log/fess/fess.log tail -qF /var/log/fess/fess-crawler.log /var/log/fess/fess-llm.log /var/log/fess/fess-suggest.log /var/log/fess/fess-thumbnail.log /var/log/fess/fess.log /var/log/fess/audit.log 2>/dev/null & print_log INFO "Starting Fess service." su -s /bin/bash -c "source /etc/default/fess && cd /usr/share/fess && ./bin/fess" fess & } ``` -------------------------------- ### Start Fess, OpenSearch, and MinIO Services Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Launches the Fess, OpenSearch, and MinIO services using Docker Compose. Ensure all specified compose files are present in the directory. ```bash docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-minio.yaml \ up -d ``` -------------------------------- ### MinIO Command Configuration Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Specifies the command to start the MinIO server, mounting a local volume for data storage. ```yaml command: server /data ``` -------------------------------- ### Start Fess with Combined Services using Override File Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Command to start Fess services using a combined override file to manage environment variables, ensuring proper integration of storage and LLM services. ```bash docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-dashboards3.yaml \ -f compose-combined.yaml \ -f compose-ollama.yaml \ up -d ``` -------------------------------- ### Configure S3-Compatible Snapshot Repository (MinIO) Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/VOLUME_AND_PERSISTENCE.md Configures an S3-compatible snapshot repository for OpenSearch, using MinIO as an example. Ensure MinIO is running and accessible. ```bash # Configure snapshot repository for MinIO curl -X PUT "localhost:9200/_snapshot/minio-repo" -H 'Content-Type: application/json' -d'{ "type": "s3", "settings": { "bucket": "opensearch-backups", "endpoint": "http://minio01:9000", "access_key": "minioadmin", "secret_key": "minioadmin" } }' ``` -------------------------------- ### Logging Configuration Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Configures the log driver and rotation settings for the Fess container. This example sets up JSON file logging with a maximum file size and number of rotated files. ```yaml logging: driver: "json-file" options: max-size: "10m" # Max size per log file max-file: "5" # Number of rotated files to keep ``` -------------------------------- ### Install Fess-Specific OpenSearch Plugins Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/opensearch-docker-image.md Installs necessary Fess plugins using their artifact coordinates and version. The -b flag ensures batch mode installation without user prompts. ```dockerfile RUN /usr/share/opensearch/bin/opensearch-plugin install \ org.codelibs.opensearch:opensearch-analysis-fess:3.7.0 -b ``` -------------------------------- ### List Installed Plugins in OpenSearch Docker Image Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/opensearch-docker-image.md Run this command to list all plugins installed within the Fess OpenSearch Docker image. This helps in verifying the image's components. ```bash docker run --rm ghcr.io/codelibs/fess-opensearch:3.7.0 \ /usr/share/opensearch/bin/opensearch-plugin list ``` -------------------------------- ### Install Ollama Models Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Commands to list, pull, and verify the installation of language models within the Ollama Docker container. Choose a model based on your hardware and quality requirements. ```bash # List available models docker exec ollama01 ollama list # Pull a model (choose one) docker exec ollama01 ollama pull gemma:7b docker exec ollama01 ollama pull llama2:7b docker exec ollama01 ollama pull mistral:7b # Verify model loaded docker exec ollama01 ollama list ``` -------------------------------- ### Start Fess with OpenAI Services Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Sets the OpenAI API key and starts the Fess, OpenSearch, and OpenAI services using Docker Compose. Ensure the OPENAI_API_KEY environment variable is exported before running. ```bash # Set API key export OPENAI_API_KEY="sk-..." # Start services docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-openai.yaml \ up -d ``` -------------------------------- ### Start Fess with Debugging Shell Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md This command starts the Fess container and drops into a shell after startup if `RUN_SHELL` is set to true. This is useful for debugging startup issues. ```bash # With debugging shell docker run -it \ -e RUN_SHELL=true \ ghcr.io/codelibs/fess:15.7.0 ``` -------------------------------- ### Fess Plugin Installation Environment Variable Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Use the FESS_PLUGINS environment variable to automatically download and install Fess plugins during startup. ```yaml FESS_PLUGINS=fess-llm-ollama:15.7.0 ``` -------------------------------- ### Start 2 Fess Instances Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Command to start two Fess instances with a shared OpenSearch cluster using Docker Compose. Ensure you are in the `compose/multi-instance` directory. ```bash cd compose/multi-instance # Start with 2 instances docker compose \ -f compose.yaml \ -f compose-fess01.yaml \ -f compose-fess02.yaml \ up -d ``` -------------------------------- ### Multi-instance Docker Compose Up Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/MANIFEST.txt Deploy Fess in a multi-instance setup by navigating to the multi-instance directory and using specific compose files. ```bash cd compose/multi-instance docker compose -f compose.yaml -f compose-fess01.yaml -f compose-fess02.yaml up -d ``` -------------------------------- ### List Installed Packages in Fess Docker Image Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md Inspect the Fess Docker image to list all installed packages using apk. ```bash docker run --rm ghcr.io/codelibs/fess:15.7.0 apk list --installed ``` -------------------------------- ### Install Plugin and Set Ownership Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md Moves the downloaded plugin JAR file to the Fess plugin directory and sets the correct ownership to the 'fess:fess' user. Temporary checksum files are removed. ```bash if ! curl -fs -o "${temp_dir}/${plugin_file}" "${plugin_url}" > /dev/null; then print_log ERROR "Failed to download ${plugin_file}." return fi # ... checksum validation ... print_log INFO "Installing ${plugin_file}" rm -f "${temp_dir}/${plugin_file}.sha1" mv "${temp_dir}/${plugin_file}" "${plugin_dir}" chown fess:fess "${plugin_dir}/${plugin_file}" ``` -------------------------------- ### Standard Fess Deployment with Docker Compose Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/README.md Use this command to start a standard Fess instance using Docker Compose. Access the Fess UI and admin panel via the provided URLs. ```bash cd docker-fess docker compose -f compose.yaml -f compose-opensearch3.yaml up -d # Access Fess open http://localhost:8080 # Search UI open http://localhost:8080/admin # Admin panel (admin/admin) ``` -------------------------------- ### Docker Compose Multi-Value Default Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Demonstrates setting a default value for a multi-value environment variable like dictionary paths. ```yaml environment: - "FESS_DICTIONARY_PATH=${FESS_DICTIONARY_PATH:-/usr/share/opensearch/config/dictionary/}" ``` -------------------------------- ### Define Dockerfile Build Arguments Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md Example of defining build arguments for FESS_VERSION and CACHEBUST in a Dockerfile. ```dockerfile ARG FESS_VERSION=15.7.0 ARG CACHEBUST=1 # Change to force rebuild ``` -------------------------------- ### Example Usage of print_log Function Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md Demonstrates how to call the print_log function with different log levels and messages. Ensure the log_level and message variables are set before execution. ```bash print_log INFO "Downloading from ${plugin_url}" print_log WARN "ES_HTTP_URL is deprecated." print_log ERROR "Failed to download ${plugin_file}." ``` -------------------------------- ### Set Log Levels Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/opensearch-docker-image.md Configure logging levels for OpenSearch. This example sets the general logger to INFO and a specific 'codelibs' logger to DEBUG. ```properties logger.level = INFO logger.codelibs.level = DEBUG ``` -------------------------------- ### Debug Fess Plugin Installation Issues Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Troubleshoot plugin installation problems by checking the downloaded plugins directory within the Fess container and examining Fess logs for any plugin-related errors. ```bash # Check downloaded plugins docker compose exec fess01 \ ls -la /usr/share/fess/app/WEB-INF/plugin/ # Check plugin load errors in logs docker compose logs fess01 | grep -i plugin ``` -------------------------------- ### Start Fess with OpenSearch and OpenAI (AI/RAG Chat) Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Sets up Fess to integrate with OpenAI for AI/RAG chat capabilities. Ensure the OPENAI_API_KEY environment variable is set. ```bash export OPENAI_API_KEY="sk-..." # Get one at https://platform.openai.com/api-keys docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-openai.yaml up -d ``` -------------------------------- ### Start Fess with OpenSearch and Ollama (AI/RAG Chat) Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Enables Fess to use Ollama for AI/RAG chat functionality with OpenSearch. Requires NVIDIA Container Toolkit for GPU support. ```bash docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-ollama.yaml up -d ``` -------------------------------- ### Multi-Instance Fess Setup Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/INDEX.md Configures a multi-instance Fess environment using Docker Compose. Access individual instances at http://localhost:8080 and http://localhost:8081. ```bash cd compose/multi-instance docker compose \ -f compose.yaml \ -f compose-fess01.yaml \ -f compose-fess02.yaml \ up -d # Access instances open http://localhost:8080 # Instance 1 open http://localhost:8081 # Instance 2 ``` -------------------------------- ### Start Fess with OpenSearch and Google Gemini (AI/RAG Chat) Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Configures Fess to use Google Gemini for AI/RAG chat. Requires setting the GEMINI_API_KEY environment variable. ```bash export GEMINI_API_KEY="AIzaSy..." # Get one at https://aistudio.google.com/apikey docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-gemini.yaml up -d ``` -------------------------------- ### Combine MinIO and Ollama with FESS_JAVA_OPTS Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md When using multiple overlay files, the last FESS_JAVA_OPTS value takes precedence. This example shows how to merge options for MinIO and Ollama into a single FESS_JAVA_OPTS. ```yaml services: fess01: environment: - "FESS_JAVA_OPTS=-Dfess.system.storage.accesskey=... -Dfess.system.storage.secretkey=... -Dfess.system.storage.endpoint=http://minio01:9000 -Dfess.system.storage.bucket=fess -Drag.llm.ollama.api.url=http://ollama01:11434" ``` -------------------------------- ### Start Single Fess Instance with Dashboards Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/DEPLOYMENT_PATTERNS.md Use this command to launch a single Fess instance along with OpenSearch and OpenSearch Dashboards. Ensure the specified compose files are present in the current directory. ```bash docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-dashboards3.yaml \ up -d ``` -------------------------------- ### Multi-Instance Fess Deployment with AI Integration Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Set up a multi-instance Fess deployment with AI capabilities by exporting OpenAI API key and specifying Fess plugins. This example uses multiple Docker Compose files for configuration. ```bash export OPENAI_API_KEY="sk-..." export FESS_PLUGINS="fess-llm-openai:15.7.0" docker compose \ -f compose/multi-instance/compose.yaml \ -f compose/multi-instance/compose-fess01.yaml \ -f compose/multi-instance/compose-fess02.yaml \ -f compose-openai.yaml \ up -d ``` -------------------------------- ### Start Fess with OpenSearch and MinIO Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Integrates Fess with OpenSearch and MinIO for object storage. This configuration is suitable for scenarios requiring external object storage. ```bash docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-minio.yaml up -d ``` -------------------------------- ### Port Mapping Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Maps a host port to the Fess container port. Ensure the host port is accessible. ```yaml ports: - "8080:8080" # host_port:container_port ``` -------------------------------- ### Add a New Fess Instance Configuration Source: https://github.com/codelibs/docker-fess/blob/master/compose/multi-instance/README.md To scale up, create a new `compose-fessXX.yaml` file with a unique configuration for the additional Fess instance. This example shows configuration for `fess03`. ```yaml services: fess03: image: ghcr.io/codelibs/fess:snapshot container_name: fess03 environment: - "SEARCH_ENGINE_HTTP_URL=http://search01:9200" - "FESS_DICTIONARY_PATH=${FESS_DICTIONARY_PATH:-/usr/share/opensearch/config/dictionary/}" - "FESS_JAVA_OPTS=-Dfess.config.index.document.search.index=fess03.search -Dfess.config.index.document.update.index=fess03.update -Dfess.config.index.document.suggest.index=fess03 -Dfess.config.index.document.crawler.index=fess03_crawler -Dfess.config.index.config.index=fess03_config -Dfess.config.index.user.index=fess03_user -Dfess.config.index.log.index=fess03_log -Dfess.config.index.dictionary.prefix=fess03" ports: - "8082:8080" networks: - search_net depends_on: - search01 logging: driver: "json-file" options: max-size: "10m" max-file: "5" restart: unless-stopped ``` -------------------------------- ### Clone Repository and Navigate Source: https://github.com/codelibs/docker-fess/blob/master/compose/multi-instance/README.md Clone the repository and navigate to the multi-instance Docker Compose directory. ```bash git clone https://github.com/codelibs/docker-fess.git cd docker-fess/compose/multi-instance ``` -------------------------------- ### Fess Debugger Setup and Access Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Enable debugging for Fess by setting the RUN_SHELL environment variable to true. After startup, the container drops to a shell where you can inspect configuration and Java versions. ```bash export RUN_SHELL=true docker compose up -d # Container drops to shell after startup docker attach fess01 # Inside shell cat /etc/default/fess java -version ``` -------------------------------- ### Fess Deployment with Object Storage (MinIO) Source: https://github.com/codelibs/docker-fess/blob/master/README.md Starts Fess with MinIO for file storage using Docker Compose. Access Fess at http://localhost:8080 and the MinIO Console at http://localhost:9001. ```bash docker compose -f compose.yaml -f compose-opensearch3.yaml -f compose-minio.yaml up -d open http://localhost:8080 # Fess open http://localhost:9001 # MinIO Console ``` -------------------------------- ### Multi-Instance Fess Deployment with AI Integration Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/README.md Deploy a multi-instance Fess setup with AI capabilities by setting the OPENAI_API_KEY environment variable and using specific Docker Compose files. This is for advanced configurations. ```bash export OPENAI_API_KEY="sk-..." docker compose \ -f compose/multi-instance/compose.yaml \ -f compose/multi-instance/compose-fess01.yaml \ -f compose/multi-instance/compose-fess02.yaml \ -f compose-openai.yaml \ up -d ``` -------------------------------- ### Essential Docker Fess Environment Variables Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/INDEX.md Configure search engine connection, memory, dictionary path, plugin installation, and AI/LLM API keys using these essential environment variables. ```bash # Search engine connection SEARCH_ENGINE_HTTP_URL=http://opensearch:9200 # Memory configuration FESS_HEAP_SIZE=2g OPENSEARCH_JAVA_OPTS=-Xms2g -Xmx2g # Dictionary path FESS_DICTIONARY_PATH=/usr/share/opensearch/config/dictionary/ # Plugin installation FESS_PLUGINS="fess-webapp-semantic-search:15.7.0" # AI/LLM configuration OPENAI_API_KEY=sk-... GEMINI_API_KEY=AIzaSy... ``` -------------------------------- ### Isolated Volumes per Fess Instance Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/VOLUME_AND_PERSISTENCE.md In a multi-instance Fess setup, separate volumes are created for each instance to ensure data isolation. This example shows typical volume names for search data and dictionaries. ```text compose_searchdata01 # Shared (single-node cluster) compose_searchdict01 # Shared dictionary # Each Fess instance has different indices within same OpenSearch ``` -------------------------------- ### Standard Fess Deployment with Docker Compose Source: https://github.com/codelibs/docker-fess/blob/master/README.md Clones the Fess Docker repository and starts Fess with OpenSearch using Docker Compose. Access the Fess web interface at http://localhost:8080. ```bash git clone https://github.com/codelibs/docker-fess.git cd docker-fess docker compose -f compose.yaml -f compose-opensearch3.yaml up -d open http://localhost:8080 ``` -------------------------------- ### Standard Production Fess Deployment Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Configure Fess for a standard production environment by setting heap size and search engine connection details. This example uses Docker Compose to bring up the services. ```bash export FESS_HEAP_SIZE=2g export SEARCH_ENGINE_HTTP_URL=http://opensearch.company.com:9200 export SEARCH_ENGINE_USERNAME=elastic-user export SEARCH_ENGINE_PASSWORD=secure-password docker compose -f compose.yaml -f compose-opensearch3.yaml up -d ``` -------------------------------- ### Set Up Fess Dictionary Directory Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/opensearch-docker-image.md Creates a directory for Fess dictionary files and sets the correct ownership to the 'opensearch' user, ensuring proper access for Fess. ```dockerfile RUN mkdir /usr/share/opensearch/config/dictionary && \ chown opensearch /usr/share/opensearch/config/dictionary ``` -------------------------------- ### ECS JSON Log Format Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md An example log entry demonstrating the Elastic Common Schema (ECS) JSON format used by Fess logs. ```json { "@timestamp": "2025-01-15T10:30:45.123Z", "log.level": "INFO", "message": "Starting Fess service.", "ecs.version": "1.2.0", "service.name": "fess", "event.dataset": "app", "process.thread.name": "bootstrap", "log.logger": "run.sh" } ``` -------------------------------- ### Tailing Log Files in Entrypoint Script Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md The entrypoint script uses `tail -qF` to continuously monitor and output multiple Fess log files to stdout. ```bash tail -qF /var/log/fess/fess-crawler.log \ /var/log/fess/fess-llm.log \ /var/log/fess/fess-suggest.log \ /var/log/fess/fess-thumbnail.log \ /var/log/fess/fess.log \ /var/log/fess/audit.log 2>/dev/null & ``` -------------------------------- ### Install Custom Fess Plugins Source: https://github.com/codelibs/docker-fess/blob/master/README.md Extend Fess functionality by installing custom plugins. Specify the desired plugins and their versions in the FESS_PLUGINS environment variable within your docker-compose configuration. ```yaml environment: - FESS_PLUGINS=fess-webapp-semantic-search:15.7.0 fess-ds-wikipedia:15.7.0 ``` -------------------------------- ### Create and Verify OpenSearch Snapshot Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/VOLUME_AND_PERSISTENCE.md Creates a snapshot of the OpenSearch data and provides a command to verify its creation. ```bash # Create snapshot curl -X PUT "localhost:9200/_snapshot/backup/snapshot_1" # Verify snapshot curl -X GET "localhost:9200/_snapshot/backup/snapshot_1" ``` -------------------------------- ### Health Check Configuration Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Defines how Docker should check the health of the Fess service. This example uses curl to check an API endpoint with specified intervals, timeouts, and retries. ```yaml healthcheck: test: ["CMD-SHELL", "curl -f http://localhost:8080/api/v1/health || exit 1"] interval: 30s # How often to run check timeout: 10s # Time limit per check retries: 3 # Consecutive failures before unhealthy start_period: 120s # Grace period before first check ``` -------------------------------- ### Configure SSL/TLS Keystore Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Mount a keystore file and configure Fess to use it for SSL/TLS connections. Replace 'YourPassword' with your actual keystore password. ```yaml volumes: - ./certs/keystore.jks:/usr/share/fess/keystore.jks:ro environment: - "FESS_JAVA_OPTS=-Dserver.ssl.key-store=/usr/share/fess/keystore.jks \ -Dserver.ssl.key-store-password=YourPassword" ``` -------------------------------- ### Pull Ollama Models Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Use docker exec to pull AI models into the Ollama service after it has started. ```bash docker exec -it ollama01 ollama pull gemma:7b ``` ```bash docker exec -it ollama01 ollama pull llama2:7b ``` -------------------------------- ### Network Definition Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Defines a bridge network for services to communicate. Services within this network can resolve each other by name. ```yaml networks: search_net: driver: bridge ``` -------------------------------- ### Fess Startup Sequence Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md Executes the Fess application startup. It includes an option to drop into an interactive shell for debugging if `RUN_SHELL` is set to 'true', otherwise it proceeds to monitor the application's health. ```bash start_fess if [[ "x${RUN_SHELL}" = "xtrue" ]] ; then /bin/bash else wait_app fi ``` -------------------------------- ### Pull LLM Model for Ollama Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Pulls a specified LLM model (e.g., gemma4:e4b) to the Ollama service after it has been started. ```bash docker exec -it ollama01 ollama pull gemma4:e4b ``` -------------------------------- ### Stop Fess and Associated Services Source: https://github.com/codelibs/docker-fess/blob/master/compose/README.md Shuts down Fess and any services started with the specified compose files. This command stops and removes containers. ```bash docker compose -f compose.yaml -f compose-opensearch3.yaml down ``` -------------------------------- ### Configure OpenSearch Snapshot Repository Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/VOLUME_AND_PERSISTENCE.md Configures a file system-based snapshot repository for OpenSearch. Ensure the specified location is accessible by the OpenSearch container. ```bash # Create snapshot repository curl -X PUT "localhost:9200/_snapshot/backup" -H 'Content-Type: application/json' -d'{ "type": "fs", "settings": { "location": "/mnt/snapshots" } }' ``` -------------------------------- ### Check File Ownership in Fess Docker Image Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md Verify the ownership and permissions of files within the Fess installation directory in the Docker image. ```bash docker run --rm ghcr.io/codelibs/fess:15.7.0 ls -la /usr/share/fess ``` -------------------------------- ### Restart Policy Example Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/docker-compose-reference.md Sets the restart policy for the Fess container. 'unless-stopped' ensures the container restarts automatically unless it is manually stopped. ```yaml restart: unless-stopped ``` -------------------------------- ### Set Fess Search Index Name Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/opensearch-docker-image.md Configure the Fess search index name for a specific instance in a multi-instance setup using FESS_JAVA_OPTS. ```shell FESS_JAVA_OPTS=-Dfess.config.index.document.search.index=fess01.search ``` -------------------------------- ### Fess Deployment with Monitoring Dashboard Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/INDEX.md Sets up Fess, OpenSearch, and OpenSearch Dashboards for monitoring. Access the dashboards at http://localhost:5601. ```bash docker compose \ -f compose.yaml \ -f compose-opensearch3.yaml \ -f compose-dashboards3.yaml \ up -d open http://localhost:5601 # OpenSearch Dashboards ``` -------------------------------- ### Configure HTTPS Proxy with Authentication Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/ENVIRONMENT_REFERENCE.md Configure Java options for an HTTPS proxy that requires authentication. Provide username and password for proxy access. ```bash FESS_JAVA_OPTS="-Dhttps.proxyHost=proxy.company.com \ -Dhttps.proxyPort=8080 \ -Dhttps.proxyUser=username \ -Dhttps.proxyPassword=password" ``` -------------------------------- ### Fess Docker Image Entrypoint Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md The entrypoint script for the Fess Docker image. This script handles initialization and environment configuration before starting the Fess application. ```Shell ENTRYPOINT ["/usr/share/fess/run.sh"] ``` -------------------------------- ### Backup Dictionary Volume to Local Host Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/VOLUME_AND_PERSISTENCE.md Create a compressed archive of the persistent dictionary volume on the local host. This command uses a temporary Alpine container to read from the volume and write the backup to the current directory. ```bash docker run --rm -v search01_dictionary:/data -v $(pwd):/backup \ alpine tar czf /backup/dictionary-backup.tar.gz /data ``` -------------------------------- ### Check Fess Container Logs for Startup Errors Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/api-reference/fess-docker-image.md Inspect the logs of the Fess container to identify startup issues, particularly related to the search engine connection. Look for 'SEARCH_ENGINE_HTTP_URL' in error messages. ```bash docker compose logs fess01 ``` -------------------------------- ### Download Snapshot Plugin Version Source: https://github.com/codelibs/docker-fess/blob/master/_autodocs/STARTUP_SCRIPTS.md Handles downloading snapshot plugins by first fetching the `maven-metadata.xml` file from the Sonatype snapshots repository. It then extracts the timestamp and build number to construct the correct filename and URL for the snapshot JAR. ```bash if [[ ${plugin_version} == *-SNAPSHOT ]] ; then metadata_file="${temp_dir}/maven-metadata.$$" metadata_url="https://oss.sonatype.org/content/repositories/snapshots/org/codelibs/fess/${plugin_name}/${plugin_version}/maven-metadata.xml" if ! curl -fs -o "${metadata_file}" "${metadata_url}" ; then print_log ERROR "Failed to download from ${metadata_url}." return fi version_timestamp=$(cat ${metadata_file} | grep "" | head -n1 | sed -e "s,.*timestamp>\(.*\)" | head -n1 | sed -e "s,.*buildNumber>\(.*\)