How to run a deploy script

I try to deploy a dockerized django project. I created a docker droplet for it with SSH key. I wrote a script for the deployment to digitalocean. ex: I don’t understand how I can run from my local machine.

Naively, I thought that the following would work:

export DIGITAL_OCEAN_IP_ADDRESS=<MY_DROPLET_IP> # as this is needed for the script.

bash compose/

This raises the error:

compose/ line 14: git: command not found
Uploading project...
compose/ line 17: rsync: command not found
Uploaded complete.
Building image...
compose/ line 21: ssh: command not found
Build complete.

If I understand it correctly, there might be a problem with the SSH settings. Is it? If yes, how can I fix it?

Any return would be highly appreciated.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
May 4, 2023

Hello @leacards

It looks like you’re missing some essential command-line tools like git, rsync, and ssh on your local machine.

Can you double check that these packages are present/installed on your machine?

After installing these tools, try running your script again. Note that you should also make sure the DO Droplet has the correct public SSH key added for your local machine. If you need help with setting up SSH keys, refer to the DigitalOcean SSH Keys documentation.

For more details on deploying a Dockerized Django application, check out DigitalOcean tutorials such as How to Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 20.04 and Docker Explained: How To Containerize Your Django Application.

Hope that this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel