Deploy to DigitalOcean
This tutorial will show you how to deploy your services to your own DigitalOcean account using Defang.
Pre-requisites
- A Dockerfile in your project
- A
compose.yaml
file in your project - A Defang Account
- The Defang CLI
- DigitalOcean Account Credentials
- DigitalOcean Spaces Access Keys
Step 1 - Navigate to your project directory
Head to the folder where your project is located.
$ cd path/to/your/project
Step 2 - Authenticate Defang to use your DigitalOcean Account
Defang will look for your DigitalOcean credentials in your shell environment and expect to find the following credentials:
- the
DIGITALOCEAN_TOKEN
environment variable - and, the
SPACES_ACCESS_KEY_ID
andSPACES_SECRET_ACCESS_KEY
environment variables
Step 3 - Deploy
Invoke the defang compose up
CLI command with the --provider=do
flag or set the DEFANG_PROVIDER=do
environment variable.
For example:
$ defang compose up --provider=do
Step 4 - Inspect your deployment
Defang will provision resources in your DigitalOcean account and deploy your services. You can inspect the resources created in your DigitalOcean Dashboard.
For a deeper discussion of the Defang DigitalOcean Architecture, see our DigitalOcean Provider docs.