Digital Ocean Apps Resource-Specific Variables

Hello,
First things first, congrats for the platform it really cool…
I’m configuring Doppler for a my small side project deployed on DigitalOcean Apps. Now I’m encountering some problems when I’ve to configure the associated DB. As reported on the docs hereresource-specific-variables but it’s not totally clear to me :slight_smile:

So if I’ve understood right I’ve to override them on DO with the right resource specific variable?
In this case will be a shame 'cause, as in my case, the DB url can be required from other “projects” so in this case we lose the awesome secret-reference feature.

Or there’s some workaround to archive it?

Tnx
C.

Hi @a_claaa!

Welcome to the Doppler Community!

So, the issue here is that DigitalOcean has some special ways to reference the dynamically updated and maintained variables for things like the DB URL in their environment. Since these can be updated by DO on their dynamically, you don’t generally want to hard-code the value into Doppler and then sync that over because it could get updated dynamically and then your app would break because it would be using an outdated version of the secret from Doppler.

As such, you’ll likely want to use DO’s variables. Unfortunately, since they use the same syntax we do for secret referencing, you can’t just put something like ${_self.DATABASE_URL} as the value of a secret in Doppler because it’ll trigger an error. So, the only way to take advantage of these variables is to setup a secret override at the component level for your app components. This should generally just require a one-time setup, but if you do have a lot of components, that initial setup could be a little tedious.

Sorry that there’s not a better way to accomplish this right now!

Regards,
-Joel