How to get Entities in Docker compose?

Hi everyone, to get entities via API I’m using locally this endpoint and works fine : http://localhost:5005/model/parse

but In Docker Composer I can’t find the parse endopint, I tried:

http://localhost:5005/model/parse/webhooks/rest/webhook http://localhost:5005/webhooks/rest/webhook/model/parse

but the endpoint can’t be found NotFound(“Requested URL {} not found”.format(url)

I’m following the documentation, but I don’t know how to get the entities https://rasa.com/docs/rasa/1.10.11/user-guide/docker/deploying-in-docker-compose/

how can I get the entities in Docker Composer? which is the parse endpoint?

thanks

You likely need to run the server with: rasa run --enable-api the option will open up the other routes; I believe by default the rasa server will just do rasa run with no options.

as you suggested, I included rasa run --enable-api in the docker-compose.yml file, but then, docker-compose up returns this error:

rasa_1 | rasa: error: invalid choice: ‘run --enable-api’ (choose from ‘init’, ‘run’, ‘shell’, ‘train’, ‘interactive’, ‘test’, ‘visualize’, ‘data’, ‘export’, ‘x’)

I have the same question. I add --enable-api in command X at docker-compose.yml but the endpoint doesn´t work:

{{url}}/api/model/parse

image

Anyone to help?

Hi, as alternative, I deployed the rasa-api in kubernetes (aws-eks) by using the Cortex platform (https://docs.cortex.dev/) and worked fine.

This is a deploy example: rasa-tools/rasa-deploy-with-Cortex-kubernetes-aws-eks at master · andres-gv/rasa-tools · GitHub

hey yes this is happening if I am trying to run with enable endpoint command docker compose is giving me error…

How do we solve it?

Did you get the solution for this one? :frowning:

it’s giving you that error because the parameters are all on one line. So instead of something like this:

command: run -m models --cors "*" --debug

Do this:

command:
  - run
  - -m
  - models
  - --cors
  - "*"
  - --debug

or this (whatever your preference):

command: ["run", "-m", "models", "--cors", "'*'", "--debug"]

it worked, thank you so much , thanks a lot :heart: :heart: :heart: :heart: I have invested the whole day in figuring out and here you saved me before the days end, thanks once again

Hey! just one confusion… If I want to run run -m models --cors “*” --debug( responsible to enable apis) and rasa run -m models --endpoints endpoints.yml ( responsible for my mongo tracker) as per the rasa docs Tracker Stores

then how to write this because if I am adding --endpoints, my api is not getting enabled, but mongo is running fine and if I remove --endpoints, in that case mongo is not running…

    version: '3.0'
services:
  rasa:
    image: 'rasa/rasa:2.5.0-full'
    ports:
      - '5005:5005'
    volumes:
      - './:/app'
    command:
      - run
      - -m
      - models
      - --cors
      - "*"
      - --debug
      - --endpoints 
  
  action-server:
    image: 'rasa/rasa-sdk:2.5.0'
    volumes:
      - './actions:/app/actions'
    ports:
      - '5055:5055'

  mongo:
    image: 'mongo'
    environment:
      MONGO_INITDB_ROOT_USERNAME: None
      MONGO_INITDB_ROOT_PASSWORD: None
  
  mongo-express:  # this service is a MongoDB UI, and is optional
    image: 'mongo-express'
    ports:
      - '8081:8081'
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: None
      ME_CONFIG_MONGODB_ADMINPASSWORD: None

I think you’re just missing the endpoints.yml specification in the command, so it would be:

version: '3.0'
services:
  rasa:
    image: 'rasa/rasa:2.5.0-full'
    ports:
      - '5005:5005'
    volumes:
      - './:/app'
    command:
      - run
      - -m
      - models
      - --cors
      - "*"
      - --debug
      - --endpoints 
      - endpoints.yml # this is the missing parameter

  action-server:
    image: 'rasa/rasa-sdk:2.5.0'
    volumes:
      - './actions:/app/actions'
    ports:
      - '5055:5055'

  mongo:
    image: 'mongo'
    environment:
      MONGO_INITDB_ROOT_USERNAME: None
      MONGO_INITDB_ROOT_PASSWORD: None
  
  mongo-express:  # this service is a MongoDB UI, and is optional
    image: 'mongo-express'
    ports:
      - '8081:8081'
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: None
      ME_CONFIG_MONGODB_ADMINPASSWORD: None
1 Like