Postgresql Docker

I created a bot that asks user information and stores in postgresql database.it works well in locally. Now I want to deploy it in docker so I need help what are the changes I have to made. can anyone help me. Thanks in advance.

@nik202

@Shan Firstly, check how to create the docker image for postgres and then you need to check the IP address of Docker and ports to be used I guess 5432 is the default port number for Postgres, but container IP is different and localhost is different, you need to inspect the docker container. I hope this will help you. It is very complex process, see some videos.

Thank you @nik202 . can you check this code is correct or not?

FROM rasa/rasa-sdk:2.8.0
WORKDIR /app
USER root
COPY ./actions /app/actions USER 1001

version: “3.0”
services:
rasa:
container_name: rasa-server
image: rasa/rasa:2.8.0-full
ports:
- 5005:5005
volumes:
- ./:/app
command:
- run
- --cors
- “*”
- --enable-api
- --log-file
- out.log
depends_on:
- action-server
action-server:
container_name: action-server1
image: rasa/rasa-sdk:2.8.0
volumes:
- ./actions:/app/actions
ports:
- 5055:5055

changed url into action_endpoint:
url: “http://action-server1:5055/webhook

@Shan Yes, Seems fine hope this one is running?

yes it is running.

@Shan Then? Did you seen what I suggest in my last post?

Yes, I have been trying to do that but it is very complex to understand.

@Shan You need to see and figure it out. Because there is not a tutorial I can share.

Now I want to run the flask in the docker

@Shan Honestly, can I say one thing. One topic one discuss, its Postgres docker not flask.