Rasa X custom config not loaded

Hello,

I tried setting up Rasa X with docker-compose as described in the Docs. After a little bit of adapting environment vars and the docker-compose file the service was successfully deployed. The only problem that remains is that my custom configuration is not loaded.

Specifically I want to know how to configure Rasa X via docker-compose or envvars such that it knows where to look for the following files/folders:

  • config.yml
  • domain.yml
  • data/
    • nlu.md
    • stories.md
  • models/

For reference, here are my and docker-compose.yml and .env:

version: "3.4"

x-database-credentials: &database-credentials
  DB_HOST: "db"
  DB_PORT: "5432"
  DB_USER: "${DB_USER:-admin}"
  DB_PASSWORD: "${DB_PASSWORD}"
  DB_LOGIN_DB: "${DB_LOGIN_DB:-rasa}"

x-rabbitmq-credentials: &rabbitmq-credentials
  RABBITMQ_HOST: "rabbit"
  RABBITMQ_USERNAME: "user"
  RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}

x-rasax-credentials: &rasax-credentials
  LOCAL_MODE: "false"
  RASA_X_HOST: "http://rasa-x:5002"
  RASA_X_TOKEN: ${RASA_X_TOKEN}
  JWT_SECRET: ${JWT_SECRET}
  RASA_USER_APP: "http://app:5055"
  RASA_WORKER_HOST: "http://rasa-worker:5005"
  RASA_TOKEN: ${RASA_TOKEN}
  RASA_WORKER_TOKEN: ${RASA_TOKEN}

x-rasa-credentials: &rasa-credentials
  <<: *rabbitmq-credentials
  <<: *rasax-credentials
  <<: *database-credentials
  RASA_TOKEN: ${RASA_TOKEN}
  RASA_MODEL_PULL_INTERVAL: 10

x-rasa-services: &default-rasa-service
  restart: always
  image: "rasa/rasa:${RASA_VERSION}-full"
  volumes:
  - ./credentials.yml:/app/credentials.yml
  - ./endpoints.yml:/app/endpoints.yml
  expose:
  - "5005"
  command: >
    x
    --no-prompt
    --production
    --port 5005
    --jwt-method HS256
    --jwt-secret ${JWT_SECRET}
    --auth-token '${RASA_TOKEN}'
    --cors "*"
  depends_on:
  - rasa-x
  - rabbit

services:
  rasa-x:
    restart: always
    image: "rasa/rasa-x:${RASA_X_VERSION}"
    expose:
      - "5002"
    volumes:
      - ./environments.yml:/app/environments.yml
      - ./logs:/logs
      - ./auth:/app/auth
    environment:
      <<: *database-credentials
      <<: *rasa-credentials
      SELF_PORT: "5002"
      DB_DATABASE: "${DB_DATABASE:-rasa}"
      RASA_MODEL_DIR: "/app/models"
      RABBITMQ_QUEUE: "rasa_production_events"
      PASSWORD_SALT: ${PASSWORD_SALT}
      RASA_X_USER_ANALYTICS: "0"
      SANIC_RESPONSE_TIMEOUT: "3600"
    depends_on:
      - db

  rasa-production:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      DB_DATABASE: "tracker"
      RABBITMQ_QUEUE: "rasa_production_events"
      RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"

  rasa-worker:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      DB_DATABASE: "tracker"
      RABBITMQ_QUEUE: "rasa_worker_events"
      RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
  
  rasa-development:
    <<: *default-rasa-service
    environment:
      <<: *rasa-credentials
      DB_DATABASE: "tracker"
      RABBITMQ_QUEUE: "rasa_development_events"
      RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/development"

  app:
    restart: always
    image: rasa/rasa-x-demo:latest
    expose:
      - "5055"
    volumes:
      - ./actions:/app/actions
    depends_on:
      - rasa-production

  db:
    restart: always
    image: "bitnami/postgresql:11.2.0"
    expose:
      - "5432"
    environment:
      POSTGRESQL_USERNAME: "${DB_USER:-admin}"
      POSTGRESQL_PASSWORD: "${DB_PASSWORD}"
      POSTGRESQL_DATABASE: "${DB_DATABASE:-rasa}"
    volumes:
      - ./db:/bitnami/postgresql

  rabbit:
    restart: always
    image: "bitnami/rabbitmq:3.7.5"
    environment:
      RABBITMQ_HOST: "rabbit"
      RABBITMQ_USERNAME: "user"
      RABBITMQ_PASSWORD: ${RABBITMQ_PASSWORD}
      RABBITMQ_DISK_FREE_LIMIT: "{mem_relative, 0.1}"
    expose:
      - "5672"

  duckling:
    restart: always
    image: "rasa/duckling:latest"
    expose:
      - "8000"
    command: ["duckling-example-exe", "--no-access-log", "--no-error-log"]

  nginx:
    restart: always
    image: "rasa/nginx:${RASA_X_VERSION}"
    ports:
      - "80:8080"
      - "443:8443"
    volumes:
      - ./certs:/opt/bitnami/certs
      - ./terms:/opt/bitnami/nginx/conf/bitnami/terms
    depends_on:
      - rasa-x
      - rasa-production
      - app

.env

RASA_X_VERSION=latest
RASA_VERSION=latest
RASA_X_DEMO_VERSION=latest
RASA_TOKEN=********
RASA_X_TOKEN=********
PASSWORD_SALT=********
JWT_SECRET=********
RABBITMQ_PASSWORD=********
DB_USER=admin
DB_PASSWORD=********

Thanks in advance, Armin

2 Likes

I have the same problem, can someone please help?

You can specify the config through the UI. No need to fiddle around with files.

@Tobias_Wochinger What about the data? Do i have to provide stories and nlu via the API and/or UI? It would be a lot easier if I could just provide them initially with files.

1 Like

You can just upload everything in the UI, you don’t even have to use the API for that.

@Tobias_Wochinger Alright, thanks! It seemed to work. Now my bot won’t respond to me but that’s another issue.

awesome :slight_smile:

@Tobias_Wochinger I understand that we can upload everything in the UI, but if I want to set up automatically the environment with what I have versionized in a commit, using API seems a better option.

Is it correct to say that the API for updating data, stories, domains and config are working for this use case?

I’d like to upload my existing stories and am a bit confused because @Tobias_Wochinger says here in response to @Incand’s question about uploading NLU & Stories that we can upload everything via the UI without need for the API. While @akelad says here that we must use the API for stories.

BTW, where’s the API docs for uploading stories?

Is it correct to say that the API for updating data, stories, domains and config are working for this use case?

Yes :slight_smile:

While @akelad says here that we must use the API for stories.

Akela is right :slight_smile: Sorry, it’s currently not yet possible to upload stories through the UI.

1 Like

To clarify, it is possible by manually copying each story into the UI and submitting afterwards.

Another nice feature to have would be a button to delete stories via the UI.

Our gorgeous frontend engineer Sam already implemented that and we will ship it soon :slight_smile:

1 Like