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/auto_deploy_do.sh
This raises the error:
compose/auto_deploy_do.sh: line 14: git: command not found
Uploading project...
compose/auto_deploy_do.sh: line 17: rsync: command not found
Uploaded complete.
Building image...
compose/auto_deploy_do.sh: 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.
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!
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.
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!