Running rasa action server on docker-compose

I try to run rasa chatbots using docker-compose. I can get all chatbots, without rasa action server, up and running.

This works, action server goes up

docker run -d -v $(pwd)/actions:/app/actions --net action-link --name action-server-prod rasa/rasa-sdk:2.2.0

But this doesnt

version: "3.5"  
services:
  action_server_prod:  
    image: rasa/rasa-sdk:2.2.0    
    volumes:  
      - ./rasaAction/actions:/app/actions 
    command:   
     - run  

I have looked this

Deploying a Rasa Assistant in Docker Compose

and these

deployment - Deploy Rasa in Docker - Stack Overflow

but no help

I can get chatbots without action server up and running, using docker-compose up. But I can not get action server up and running using docker-compose up. And as I said earlier, it works with direct docker command

Docker command:

docker run -d -v $(pwd)/actions:/app/actions --net action-link --name action-server-prod rasa/rasa-sdk:2.2.0

and result, up and running

CONTAINER ID   IMAGE                 COMMAND                  CREATED          STATUS          PORTS      NAMES
b120c19b467e   rasa/rasa-sdk:2.2.0   "./entrypoint.sh sta…"   13 seconds ago   Up 12 seconds   5055/tcp   action-server-prod

Then with docker compose command

docker-compose up

Result is failure

CONTAINER ID   IMAGE                 COMMAND                  CREATED          STATUS                      PORTS      NAMES
0ef8a23d29f6   rasa/rasa-sdk:2.2.0   "./entrypoint.sh run"    18 seconds ago   Exited (0) 17 seconds ago              rasaaction_action_server_prod_1

also I can see following error message

linttu@linttu-VirtualBox:~/bots/rasaAction$ docker-compose up
Creating rasaaction_action_server_prod_1 ... done
Attaching to rasaaction_action_server_prod_1
rasaaction_action_server_prod_1 exited with code 0

Now I run chatbot without rasa action server. This is docker-compose.yml

version: "3.5"
services:
  rasawoactionserver:
    image: rasa/rasa:2.2.0-full
    ports:
      - 5005:5005
    volumes:
      - ./rasaAction:/app
    command:
      - run

and this is result: up and running

CONTAINER ID   IMAGE                  COMMAND                  CREATED          STATUS          PORTS                                       NAMES
8eca0e816c2a   rasa/rasa:2.2.0-full   "rasa run"             23 seconds ago   Up 21 seconds   0.0.0.0:5005->5005/tcp, :::5005->5005/tcp   bots_rasawoactionserver_1

Have you figured it out? I come up with the same issue

I don’t know if the problem is still actual, but maybe this will help someone looking for the answer.

You need to add actions service to your docker-compose.yml file:

version: '3.0'
services:
  rasa:
    image: rasa/rasa:latest
    restart: always
    ports:
      - 5005
    volumes: 
      - ./app:/app
    command:
      - run

  actions:
    image: rasa/rasa-sdk:latest
    restart: always
    volumes: 
      - ./app/actions:/app/actions
    ports: 
      - 5055

This way when you run docker compose up you gonna have two docker containers: one with rasa assistant and one with actions server.