Deploy with wagtail

New to DO, I try to deploy a dev app with Wagtail(django) and Docker-Compose.

I work on windows 10. Also, I can run DOCTL commands from PowerShell.

Mainly I struggle to find a workflow to link my application to DO.

I tried to follow tutorials django-docker  which  After: set DIGITAL_OCEAN_ACCESS_TOKEN=[your_digital_ocean_token]

Propose to create a new Droplet with Docker pre-installed … but with a code:

curl -X POST \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer '$DIGITAL_OCEAN_ACCESS_TOKEN'' \ -d '{"name":"django-docker","region":"sfo3","size":"s-2vcpu-4gb","image":"docker-20-04"}' \ ""

This code is rather confusing for me, as when I access docker-pre-installed I can only create droplets, preferably by selecting Docker from Marketplace or with Ubunto18. I don’t note any shell and the console option appears only after the droplet was already created.

Also confusing is how to run the curl command. I didn’t find it in the DOCTL commands.

Since, I didn’t manage, I tried to jump over this phase by simply setting SSL and create a droplet with docker settings. Which worked just fine.

Next I run:

cat ~/.ssh/ > ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa

I closed and opened a new shell to run:

set PRIVATE_KEY='....'

Next I run: .

ssh-add - <<< "${PRIVATE_KEY}"

and got ``` “Missing file specification after redirection operator. At line:1 char:11”

The above is the last code line before I can upload source code and create an image. 
Any tip on how I should proceed 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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


Can you confirm which tutorial exactly were you following? I could try to replicate the problem at my end.

Regarding the curl command, it is an HTTP client that is available on most UNIX-based systems. I’m not 100% sure if it is available on PowerShell. It allows you to make HTTP calls. What the command that you’ve shared does is to the DigitalOcean API and all that it does is to create a new Droplet. This could also be done via the DigitalOcean Control panel as well:

And also could be done with the doctl command-line tool:

I believe that the main problem that you are facing is that the commands that you’ve shared are intended to be executed on UNIX-based systems however you are running Windows and PowerShell.

What I could suggest is, if you are using Windows, you could install WSL2 so that you could have a local Linux environment, where the commands that you’ve shared would work as expected.

You can take a look at this step by step tutorial here on how to install WSL2:

Regards, Bobby