How do I use postgres with 11.5?


#1

Yes, I have read this - https://botpress.io/docs/11.5.0/developers/tutorials/#switching-db-to-postgres

No, it doesn’t work. Firstly, there was no database field in data/global/botpress.config.json. Secondly, I added it but it doesn’t work.

Thanks!


#2

@thenilaymodi Thank you very much for raising the issue, I see that the documentation is outdated. We’ll update it tomorrow. We removed the database configuration from the botpress.config.json file since it is required to run in production.

You have two possible ways to proceed from here, both involves environment variables

  1. Define environment variables when you run Botpress:
    DATABASE=postgres
    DATABASE_URL=postgres://user:password@localhost/database

  2. Create a .env file in the same folder as the executable, with the same content as #1.