I’m trying to query a mongodb database with pymongo (I created a docker image of rasa_sdk with my dependency in it. Then I reran docker-compose down
and docker-compose up -d
) hosted on AWS from my actions.py file in RasaX on my GCP instance (episode 9 of masterclass)
Just figured it out. It was because I was missing another dependency that pymongo needs to run.
@basil-chatha can you please tell me , what i am doing wrong in this docker-compose.yml file. it is not connection with data base.
version: '3.5'
services:
nginx:
container_name: "nginx"
image: nginx
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80
depends_on:
- db
- action_server
- chatbot_ui
networks:
- cabbot-network
action_server:
container_name: "action_server"
build:
context: actions
volumes:
- ./actions:/app/actions
ports:
- "5055:5055"
depends_on:
- db
networks:
- cabbot-network
chatbot_ui:
container_name: "chatbot_ui"
build:
context: frontend
ports:
- "3000:3000"
networks:
- cabbot-network
depends_on:
- db
db:
hostname: cabbot-db
container_name: cabbot-db
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD: 123
MYSQL_DATABASE: rasasecond
MYSQL_USER: rasa
MYSQL_PASSWORD: 123abc
expose:
- "3306"
volumes:
- cabbot_db_data:/var/lib/mysql
ports:
- 3306:3306
networks:
- cabbot-network
networks:
cabbot-network:
name: cabbot-network
driver: bridge
volumes:
cabbot_db_data:
and one more thing i want to ask, do i need to change some changes in actions.py file like database path or in endpoint file. i want to use this in actions file.
thanks