Hi,
I’ve recently set up an instance with Dokku, and deployed a Rails application running on PostgreSQL with the help of dokku-pg-plugin
. Everything works perfect.
However, I would like to spin up another droplet to specifically run the database in a container, without forgoing Dokku. Anyone has experience doing something like that? From what I see dokku-pg-plugin
does not have documentation on how to link apps across servers.
Thank you!
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
If you are running the database on a separate server, your best bet would be to design your app in such a way that it determines the Postgres connection information from environment variables. This way you are able to use Dokku’s built in config managment. It is also a general best practice.
Your
database.yml
would look something like:You would then set the configuration in Dokku with: