Thanks to Docker, which abstracts from the conditions of any particular host, Divio Cloud gives you a guarantee that what works locally will also work in the Divio Cloud. However, this does depend upon following the same install/deploy cycle locally that takes place when a deployment is made via the Divio Control Panel, so although you get the guarantee, it can slow down your progress with interruptions of a few minutes each time you have to rebuild.

The deployment process is complex and has to resolve many conditions. It also has to cope with issues such as conflicting dependencies of different packages.

It's possible to shorten the cycle locally, as long as you also conduct a full test deployment locally before attempting to deploy to the cloud.

Faster local development cycles

Here is one way to obtain a faster development cycle:

Start your docker web container in the usual way. 

divio project up

Then drop into the container's bash prompt:

docker-compose run --rm --service-ports web bash

Run the Django development server inside the container: 

python runserver

Now that you have checked the server runs, update/add Python packages as required (and keep an eye on any dependencies that are installed): 

pip install some-package

Run the server again:  

python runserver

Rinse and repeat, adding packages as required.

Once you're confident about your changes, exit the container:


Add the packages you've installed earlier to container: 

echo "some-package" >>

 and finally, test the rebuilding of the container:

docker-compose build 

This is the perfect time to get a coffee or tea.

Did this answer your question?