By jotenbe
Hello,
I have a problem with Dokku and Django.
I created a DigitalOcean Dokku Droplet and pushed my Django App. The Application works fine, but there is a problem if I try to run a Django Command.
dokku run APP 'python manage.py migrate' (or collectstatic, createsuperuser - it doesn’t matter)
Every time I get this error:
/exec: row 10: python manage.py migrate: command not found
I have no idea why
Installed Plugins: 00_dokku-standard apps backup build-env checks common config docker-options dokku-apt dokku-supervisord domains git nginx-vhosts persistent-storage ps shell
Any ideas?
Thanks and Greetings Jonas
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!
The migrate sub-command was not introduced to Django until the 1.7 release. The first thing I would do is to make sure the correct version of Django is being installed in your container. The best way to do this is to specify a specific version in your requirements.txt file. E.g:
Django==1.9.8
You’ll also want to make sure that your project structure is correct. As Dokku uses a lot of best practices from Heroku, the easiest way to do that might be to use Heroku’s Django Starter Template for a new projects.
You can start a new Django project using that template, by running:
django-admin.py startproject --template=https://github.com/heroku/heroku-django-template/archive/master.zip --name=Procfile myproject
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.