Rasa x connect to cloud DB get error when SSL enabled

Hi, I’m trying to config a cloud PostgreSQL (in Azure) instead of localhost when deploy a rasa server by using docker-compose, here is my docker-compose database-credentials:

x-database-credentials: &database-credentials
  DB_HOST: "rasa-dev.postgres.database.azure.com"
  DB_PORT: "5432"
  DB_USER: "rasa@rasa-dev"
  DB_PASSWORD: "${DB_PASSWORD}"
  DB_LOGIN_DB: "${DB_LOGIN_DB:-postgres}"
  DB_QUERY: ${DB_QUERY}

When I start the containers I got this error:

File “/usr/local/lib/python3.7/site-packages/psycopg2/init.py”, line 127, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not open certificate file “/root/.postgresql/postgresql.crt”: Permission denied

My setting is sslmode=require and I don’t think I need to pass additional cert file to the container, I also tired to mount a crt file to /root/.postgresql/postgresql.crt but still got the same error.

Is there anyone facing the same issue?