diff --git a/.env b/.env index 6b6c30c..3f7769a 100644 --- a/.env +++ b/.env @@ -87,4 +87,6 @@ POSTGRES_USER=placeos POSTGRES_PASSWORD=development # Logging variables -ENABLE_LGTM=false \ No newline at end of file +ENABLE_LGTM=false +# Ollama and open-webui +ENABLE_LLAMA=false \ No newline at end of file diff --git a/README.md b/README.md index a738d22..a1eabda 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,8 @@ Arguments: --application APP_NAME Application to configure. [default: backoffice] --domain DOMAIN Domain to configure. [default: localhost:8443] --hard-reset Reset the environment to a default state. + --lgtm Enable and use Grafana LGTM stack + --llama Enable and start ollama and open-webui -v, --verbose Write logs to STDOUT in addition to the log file. -h, --help Display this message ``` diff --git a/docker-compose.yml b/docker-compose.yml index 187988f..2e2ec25 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,8 @@ volumes: core-drivers: www: minio: + ollama: + open-webui: # YAML Anchors @@ -597,3 +599,34 @@ services: url: http://loki:3100 EOF /run.sh + + ollama: + volumes: + - ollama:/root/.ollama + container_name: ollama + tty: true + restart: unless-stopped + image: ollama/ollama:${OLLAMA_DOCKER_TAG-latest} + <<: [*std-network,*std-logging] + profiles: + - llama + + open-webui: + image: ghcr.io/open-webui/open-webui:${WEBUI_DOCKER_TAG-main} + container_name: open-webui + <<: [*std-network,*std-logging] + volumes: + - open-webui:/app/backend/data + depends_on: + - ollama + profiles: + - llama + ports: + - ${OPEN_WEBUI_PORT-3000}:8080 + environment: + - 'OLLAMA_BASE_URL=http://ollama:11434' + - 'WEBUI_SECRET_KEY=' + - 'WEBUI_AUTH=False' + extra_hosts: + - host.docker.internal:host-gateway + restart: unless-stopped \ No newline at end of file diff --git a/images/service-graph.png b/images/service-graph.png index 8f8990d..5e6c866 100755 Binary files a/images/service-graph.png and b/images/service-graph.png differ diff --git a/placeos b/placeos index 8d86c50..63a50a7 100755 --- a/placeos +++ b/placeos @@ -174,6 +174,7 @@ start_environment() ( hard_reset=false enable_analytics=false enable_lgtm=false + enable_llama=false email_argument="" password_argument="" domain_argument="" @@ -215,6 +216,9 @@ start_environment() ( --lgtm) enable_lgtm=true ;; + --llama) + enable_llama=true + ;; -v | --verbose) VERBOSE="true" ;; @@ -305,6 +309,10 @@ start_environment() ( export LOG_FORMAT=JSON fi + if [[ $ENABLE_LLAMA == "true" ]] || [[ $enable_llama == "true" ]]; then + PROFILES+=" --profile llama" + fi + run_or_abort \ "${base_path}/scripts/generate-secrets" \ "Generating secrets..." \