Hello everyone,
I’m trying to deploy a chatbot that use some custom actions. To do that I’m using Docker to create a container with rasa server and action server and it’s working perfectly locally. However, action server is not found when I load the docker container on GCP and launch it in Cloud run.
The exact error message is: [RasaException: Failed to execute custom action ‘action_search’. Couldn’t connect to the server at 'http://action-server:5055/webhook.] Is the server running? Error: Cannot connect to host action-server:5055 ssl:default [Temporary failure in name resolution]
Please find below my project structure, the two Dockerfile I’m using and the docker-compose file:
Note: the endpoint i’m using for action-server is:
action_endpoint: url: “http://action-server:5055/webhook”
cloudbuild.yaml:
Dockerfile for rasa server:
FROM rasa/rasa:3.2.5
WORKDIR ‘/app’ COPY . /app
USER root
COPY ./data /app/data
RUN pip install --no-cache-dir --upgrade pip
RUN python -m pip install -r requirements.txt &&
python -m spacy download fr_core_news_md &&
python -m spacy link fr_core_news_md fr
RUN rasa train
VOLUME /app VOLUME /app/data VOLUME /app/models
CMD [“run”,“-m”,“/app/models”,“–enable-api”,“–cors”,“*”,“–debug” ,“–endpoints”, “endpoints.yml”, “–log-file”, “out.log”, “–debug”]
Dockerfile for action server:
FROM rasa/rasa-sdk:3.2.0
WORKDIR /app
COPY requirements.txt requirements.txt
USER root
RUN python3 -m pip install --upgrade pip RUN pip install --verbose -r requirements.txt
COPY ./actions /app/actions CMD [“start”,“–actions”,“actions”]
USER 1001
docker-compose.yml:
version: ‘3.4’ services:
rasa: container_name: “rasa_server” user: root build: context: . volumes: - “./:/app” ports: - “5005:5005”
action-server: container_name: action-server image: rasa/rasa-sdk:3.2.0 volumes: - ./actions:/app/actions ports: - “5055:5055”