Linking external managed database to dokku app

Posted December 24, 2021 148 views
PostgreSQLDokkuDigitalOcean Managed PostgreSQL Database

Hi, I have been trying for some time now to use to link my app running on a vps to an external managed database. I can create local database containers and link to those no problem, but am really struggling to get the database_url to point to the digital ocean managed database.

Has anyone done this before? I have not found any examples online and my efforts are proving fruitless.

1 comment
  • I think I am going about this problem incorrectly. Rather than using dokku postgres library to create an instance that links to the external service, I should be setting this env var directly in my application. I will try this and confirm. Ignore the question for now (I would delete if I saw that option)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there,

Indeed as you mentioned, it should be ok to just specify the database details as environment variables as explained here:

Let me know how it goes!