Docker Compose - Custom Actions don't work

I deployed my chatbot to EC2 instance with docker-compose. I follow the steps that be shown in Rasa Masterclass. However, custom actions don’t work. (When I run the same chatbot in my local computer there is no problem). How can I make it run properly?

docker-compose.override.yml:

    version: '3.4'
    services:
      app:
        image: 'rasa/rasa-sdk:latest'
        volumes:
          - './actions:/app/actions'
        expose:
          - '5055'
        depends_on:
          - rasa-production

actions.py:

from typing import Any, Text, Dict, List, Union
from rasa_sdk import Tracker, Action
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.forms import FormAction

PRODUCTS_DICT = {
    'product_1: '---ANSWER FOR P1---',
    'product_2': '---ANSWER FOR P2---',
    'product_3': '---ANSWER FOR P3---',
    'product_other': '---ANSWER FOR POTHER---.'
}


class ActionProducts(Action):
    def name(self) -> Text:
        return "action_products"

    def run(self, dispatcher: CollectingDispatcher, tracker: Tracker, domain: Dict[Text, Any]) -> List[Dict]:

        prediction = tracker.latest_message

        try:
            ent = prediction['entities'][0]['entity']
        except:
            ent = None

        buttons = [{"title": "Yes", "payload": "/customer_accept"},
                   {"title": "No", "payload": "/customer_deny"}]

        str_contact_info = '---SOME ANSWER---'

        try:
            if ent == 'product_other':
                dispatcher.utter_message(text=PRODUCTS_DICT.get(ent),
                                         buttons=[{"title": "Agree", "payload": "/more_info"},
                                                  {"title": "Disagree", "payload": "/customer_deny"}])
            else:
                dispatcher.utter_message(text=PRODUCTS_DICT.get(ent) + str_contact_info,
                                         buttons=buttons)
        except Exception:
            dispatcher.utter_message(
                text="Please try again")

        return []

Hi @cPhoenix, could you share the relevant logs for both Rasa Open Source and Rasa SDK? We might be able to figure out what’s not working from there.

Hi @fede,

Here are the docker-compose logs:

app_1              | 2020-06-19T12:12:43.016352136Z 2020-06-19 12:12:43 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
app_1              | 2020-06-19T12:12:43.047769495Z 2020-06-19 12:12:43 INFO     rasa_sdk.executor  - Registered function for 'action_products'.
app_1              | 2020-06-19T12:12:43.053911313Z 2020-06-19 12:12:43 INFO     rasa_sdk.executor  - Registered function for 'form_info'.

rasa-x_1           | 2020-06-19T12:12:43.791999042Z INFO:alembic.runtime.migration:Context impl PostgresqlImpl.
rasa-x_1           | 2020-06-19T12:12:43.792732525Z INFO:alembic.runtime.migration:Will assume transactional DDL.
rasa-x_1           | 2020-06-19T12:12:44.254284620Z INFO:rasax.community.services.event_service:Starting event service (standalone: False).
rasa-x_1           | 2020-06-19T12:12:45.385350964Z INFO:rasax.community.services.integrated_version_control.git_service:Cloning git repository from URL 'git@github.com:<account_name>/<repo_name>.git'.
rasa-x_1           | 2020-06-19T12:12:45.422210066Z /usr/local/lib/python3.7/site-packages/rasax/community/services/test_service.py:43: UserWarning: Unable to get tests from /app/git/1/tests/conversation_tests.md:
rasa-x_1           | 2020-06-19T12:12:45.422230933Z File '/app/git/1/tests/conversation_tests.md' does not exist. Please, make sure you have end-to-end tests added to your assistant. See https://rasa.com/docs/rasa/user-guide/testing-your-assistant/ for more information.
rasa-x_1           | 2020-06-19T12:12:45.422236500Z   UserWarning,
rasa-x_1           | 2020-06-19T12:12:45.422249187Z Starting Rasa X server... 🚀
rasa-x_1           | 2020-06-19T12:13:25.125928370Z INFO:rasax.community.services.event_consumers.pika_consumer:Start consuming queue 'rasa_production_events' on pika host 'rabbit'.