Hi, I’ve recently uploaded my Django app to a Dokku droplet, and I want to know how I can make it to work with a dump of a database I have.
I’ve tried restoring to Postgres my dump but it’s not working, but, even if I where to restore data from dump, I still don’t know how can I make my app to use that database.
Could you tell me (baby steps) how can I make my Django app work with a Postgres database in Dokku droplet?
Thanks a lot!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This answer over on StackExchange seems relevant: <br> <br>http://stackoverflow.com/a/22763027 <br> <br>
Are you using the PostgreSQL plugin for Dokku? See: <br> <br>https://github.com/Kloadut/dokku-pg-plugin <br> <br>If so, you should be able to import a dump with: <br> <br><pre> <br>dokku postgresql:restore app_name < app.sql <br></pre> <br> <br>The key thing to remember is that Dokku runs the app from inside of a Docker container. So the database dump needs to be restored to the Postgres instance inside the container, not on the host system.
When I do it I find it answers with: <br> <br> Unknown (or too old) PostgreSQL container <br> <br>I’m not sure if I’m using the PostgreSQL plugin for Dokku, when I started the droplet, I selected the Dokku option (instead of Linux distribution, I selected it from application option), so I’m not sure where it comes from. <br> <br>
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.