DigitalOcean App Platform

This guide will show you how to sync secrets to DigitalOcean App Platform to keep secrets and services up to date.

Prerequisites

  • You have created a project in Doppler
  • You have the ability to create Doppler integrations
  • You have a DigitalOcean account

Integration Setup

  1. Navigate to the Doppler config you want to add the integration sync too
  2. Go to the Integrations tab
  3. Select Add Sync
  4. Select DigitalOcean
  5. You will be sent to DigitalOcean where you must approve Doppler's access to your DigitalOcean account
  6. Upon redirection to Doppler, you will configure the following properties
    1. DigitalOcean App: the App Platform service that secrets will be synced to
    2. Config: Doppler config to sync to App Platform
    3. [Optional] Import Options: Import secrets from App Platform, prioritizing either DigitalOcean or Doppler

Upon saving, Doppler will immediately sync the appropriate secrets to DigitalOcean as well as redeploy the App Platform service that was selected.

Resource-Specific Variables

DigitalOcean has something they call resource-specific variables that can be used to reference the current resource in the context of your application. For example, ${_self.DATABASE_URL}. These aren't compatible with Doppler because they use the same syntax as our secret references. To get around this, you can set any resource-specific variables you need at the component level. Doppler syncs secrets at the app level, so you can override any specific variable Doppler syncs at the component level inside your DigitalOcean App – and you can use resource-specific variables there!

Automated Re-deployments

Each time secrets are updated in Doppler, they are synced to the appropriate App Platform service and the service is redeployed, ensuring secrets are never stale.

🚧

Each time secrets are synced, the Doppler updates the App Platform spec. This could theoretically lead to race conditions if the spec is being mutated elsewhere at the same time.