From f285cb602745d0111aeac1d3026385d78fdd6890 Mon Sep 17 00:00:00 2001 From: Davor Runje Date: Mon, 11 Nov 2024 19:00:27 +0000 Subject: [PATCH] fixes --- docs/docs/en/user-guide/adapters/fastapi/index.md | 2 +- .../docs/en/user-guide/adapters/fastapi_nats/index.md | 2 +- docs/docs/en/user-guide/adapters/nats/index.md | 2 +- docs/docs/en/user-guide/api/openapi/index.md | 2 +- docs/docs/en/user-guide/runtimes/autogen/index.md | 2 +- .../en/user-guide/runtimes/autogen/interactions.md | 2 +- .../runtimes/autogen/using_non_openai_models.md | 2 +- docs/docs/en/user-guide/runtimes/autogen/websurfer.md | 2 +- docs/docs/en/user-guide/runtimes/autogen/whatsapp.md | 2 +- docs/docs/en/user-guide/ui/console/basics.md | 2 +- docs/docs/en/user-guide/ui/mesop/basics.md | 2 +- .../fastapi/my_fastagency_app/docker/Dockerfile | 11 +++++++++-- .../docker/content/nginx.conf.template | 1 - .../mesop/my_fastagency_app/docker/Dockerfile | 11 +++++++++-- .../docker/content/nginx.conf.template | 1 - .../my_fastagency_app/docker/Dockerfile | 11 +++++++++-- .../docker/content/nginx.conf.template | 1 - 17 files changed, 38 insertions(+), 20 deletions(-) diff --git a/docs/docs/en/user-guide/adapters/fastapi/index.md b/docs/docs/en/user-guide/adapters/fastapi/index.md index a6bca3fc..6cd505b8 100644 --- a/docs/docs/en/user-guide/adapters/fastapi/index.md +++ b/docs/docs/en/user-guide/adapters/fastapi/index.md @@ -180,7 +180,7 @@ This section provides [**high-level architecture**](https://en.wikipedia.org/wik ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/adapters/fastapi_nats/index.md b/docs/docs/en/user-guide/adapters/fastapi_nats/index.md index c97ec8af..0bbde156 100644 --- a/docs/docs/en/user-guide/adapters/fastapi_nats/index.md +++ b/docs/docs/en/user-guide/adapters/fastapi_nats/index.md @@ -84,7 +84,7 @@ Now, it's time to see the [**`FastAPIAdapter`**](../../../api/fastagency/adapter ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/adapters/nats/index.md b/docs/docs/en/user-guide/adapters/nats/index.md index 0a22537a..e05de1d5 100644 --- a/docs/docs/en/user-guide/adapters/nats/index.md +++ b/docs/docs/en/user-guide/adapters/nats/index.md @@ -40,7 +40,7 @@ Now, it's time to see the Nats Adapter using FastAgency in action. Let's dive in ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/api/openapi/index.md b/docs/docs/en/user-guide/api/openapi/index.md index 7b24abb8..68b75f72 100644 --- a/docs/docs/en/user-guide/api/openapi/index.md +++ b/docs/docs/en/user-guide/api/openapi/index.md @@ -11,7 +11,7 @@ In this example, we'll use a simple [weather API](https://weather.tools.fastagen ## Install -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/runtimes/autogen/index.md b/docs/docs/en/user-guide/runtimes/autogen/index.md index 432f599f..62237d6f 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/index.md +++ b/docs/docs/en/user-guide/runtimes/autogen/index.md @@ -6,7 +6,7 @@ In this example, we will create a simple weather [**chatbot**](https://en.wikipe ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/runtimes/autogen/interactions.md b/docs/docs/en/user-guide/runtimes/autogen/interactions.md index 36463b24..35f637ab 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/interactions.md +++ b/docs/docs/en/user-guide/runtimes/autogen/interactions.md @@ -5,7 +5,7 @@ In this example, we'll demonstrate how to create custom interaction with the use ## Install -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md b/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md index 342d62b6..2080ed11 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md +++ b/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md @@ -13,7 +13,7 @@ Let’s dive in! ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/runtimes/autogen/websurfer.md b/docs/docs/en/user-guide/runtimes/autogen/websurfer.md index f265e6cb..a88e4417 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/websurfer.md +++ b/docs/docs/en/user-guide/runtimes/autogen/websurfer.md @@ -15,7 +15,7 @@ We’ll build agents and assign them the task: “Search for information about M ## Installation & Setup -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md b/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md index b8905ffd..3df22e76 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md +++ b/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md @@ -15,7 +15,7 @@ We’ll build agents and assign them the task: “Send 'Hi!' to *YOUR_NUMBER*” ## Installation & Setup -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/ui/console/basics.md b/docs/docs/en/user-guide/ui/console/basics.md index cd8bc4a5..c7f669d3 100644 --- a/docs/docs/en/user-guide/ui/console/basics.md +++ b/docs/docs/en/user-guide/ui/console/basics.md @@ -6,7 +6,7 @@ Below is an example that demonstrates how to set up a simple learning conversati ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs/en/user-guide/ui/mesop/basics.md b/docs/docs/en/user-guide/ui/mesop/basics.md index a2470bd4..32cc4910 100644 --- a/docs/docs/en/user-guide/ui/mesop/basics.md +++ b/docs/docs/en/user-guide/ui/mesop/basics.md @@ -71,7 +71,7 @@ Below, we’ll walk through the steps to set up a basic student-teacher conversa ## Installation -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. +We **strongly recommend** using [**Cookiecutter**](../../../user-guide/cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). diff --git a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile index d2c2ef95..a2a3e74f 100644 --- a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile +++ b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/Dockerfile @@ -18,11 +18,18 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -e "." RUN adduser --disabled-password --gecos '' appuser \ && chown -R appuser /app \ && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \ - && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid + && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid \ + # Allow binding to ports > 1024 without root + && sed -i 's/listen 80/listen 9999/g' /etc/nginx/sites-available/default \ + && sed -i 's/listen \[::\]:80/listen \[::\]:9999/g' /etc/nginx/sites-available/default \ + # Create required directories with correct permissions + && mkdir -p /var/cache/nginx /var/run \ + && chown -R appuser:appuser /var/cache/nginx /var/run USER appuser -EXPOSE 8000 8008 8888 +# ToDo: Fix exposing ports +# EXPOSE 8000 8008 8888 CMD ["/app/run_fastagency.sh"] diff --git a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template index 7279f13c..c55a5bc4 100644 --- a/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template +++ b/docs/docs_src/getting_started/fastapi/my_fastagency_app/docker/content/nginx.conf.template @@ -19,7 +19,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_buffering off; diff --git a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile index edce91fe..6c48bf49 100644 --- a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile +++ b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/Dockerfile @@ -18,11 +18,18 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -e "." RUN adduser --disabled-password --gecos '' appuser \ && chown -R appuser /app \ && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \ - && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid + && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid \ + # Allow binding to ports > 1024 without root + && sed -i 's/listen 80/listen 9999/g' /etc/nginx/sites-available/default \ + && sed -i 's/listen \[::\]:80/listen \[::\]:9999/g' /etc/nginx/sites-available/default \ + # Create required directories with correct permissions + && mkdir -p /var/cache/nginx /var/run \ + && chown -R appuser:appuser /var/cache/nginx /var/run USER appuser -EXPOSE 8000 8008 8888 +# ToDo: Fix exposing ports +# EXPOSE 8000 8008 8888 CMD ["/app/run_fastagency.sh"] diff --git a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template index 7279f13c..c55a5bc4 100644 --- a/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template +++ b/docs/docs_src/getting_started/mesop/my_fastagency_app/docker/content/nginx.conf.template @@ -19,7 +19,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_buffering off; diff --git a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile index 068e4c1e..f2fa97bc 100644 --- a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile +++ b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/Dockerfile @@ -18,11 +18,18 @@ RUN pip install --upgrade pip && pip install --no-cache-dir -e "." RUN adduser --disabled-password --gecos '' appuser \ && chown -R appuser /app \ && chown -R appuser:appuser /etc/nginx/conf.d /var/log/nginx /var/lib/nginx \ - && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid + && touch /run/nginx.pid && chown -R appuser:appuser /run/nginx.pid \ + # Allow binding to ports > 1024 without root + && sed -i 's/listen 80/listen 9999/g' /etc/nginx/sites-available/default \ + && sed -i 's/listen \[::\]:80/listen \[::\]:9999/g' /etc/nginx/sites-available/default \ + # Create required directories with correct permissions + && mkdir -p /var/cache/nginx /var/run \ + && chown -R appuser:appuser /var/cache/nginx /var/run USER appuser -EXPOSE 8000 8008 8888 +# ToDo: Fix exposing ports +# EXPOSE 8000 8008 8888 CMD ["/app/run_fastagency.sh"] diff --git a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template index 7279f13c..c55a5bc4 100644 --- a/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template +++ b/docs/docs_src/getting_started/nats_n_fastapi/my_fastagency_app/docker/content/nginx.conf.template @@ -19,7 +19,6 @@ server { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_buffering off;