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