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
- Navigate to the Doppler config you want to add the integration sync too
- Go to the Integrations tab
- Select Add Sync
- Select DigitalOcean
- You will be sent to DigitalOcean where you must approve Doppler's access to your DigitalOcean account
- Upon redirection to Doppler, you will configure the following properties
- DigitalOcean App: the App Platform service that secrets will be synced to
- Config: Doppler config to sync to App Platform
- [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.
Updated 9 months ago