Hi, I deployed rasa with docker-compose by Deploy to a Server. But I did not see a mounted actions file.How can i run actions file or where .
Can you please show your docker-compose file?
1 Like
my docker-compose.yml
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:
- ./models:/app/models
- ./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"
app:
restart: always
image: "rasa/rasa-x-demo:${RASA_X_DEMO_VERSION}"
expose:
- "5055"
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
logger:
restart: always
image: "rasa/logger:${RASA_X_VERSION}"
command: ["/bin/sh", "-c", "docker-compose logs --no-color -f > /logs/compose_`date '+%Y-%m-%d_%H:%M:%S'`.log"]
volumes:
- ./logs:/logs
- ./.env/:/etc/rasa/.env
- ./docker-compose.yml:/etc/rasa/docker-compose.yml
- /var/run/docker.sock:/var/run/docker.sock
working_dir: /etc/rasa
depends_on:
- rasa-x
- rasa-production
- app
- nginx
- duckling
- rabbit
actions endpoint specified endpoints.yml and mounted my endpoints.yml file
models:
url: ${RASA_MODEL_SERVER}
token: ${RASA_X_TOKEN}
wait_time_between_pulls: ${RASA_MODEL_PULL_INTERVAL}
tracker_store:
type: sql
dialect: "postgresql"
url: ${DB_HOST}
port: ${DB_PORT}
username: ${DB_USER}
password: ${DB_PASSWORD}
db: ${DB_DATABASE}
login_db: ${DB_LOGIN_DB}
event_broker:
url: ${RABBITMQ_HOST}
username: ${RABBITMQ_USERNAME}
password: ${RABBITMQ_PASSWORD}
action_endpoint:
url: ${RASA_USER_APP}/webhook
token: ""
as mentioned in the github issue, the app
service is the one that runs the actions. You can take a look at the rasa-x-demo
dockerfile to see how to setup the docker image. If you want to run your own action server you will have to add a docker-compose.override.yml
file and reference your actions image from there
I solved the problem by changing the file endpoint.yml as follow
action_endpoint:
url: server_ip:5055/webhook
token: ""
and run actions with nohup
1 Like
that also works