Is there a way to change the doppler setup inside the monorepo at once?

Hello, I’m using yarn workspace + lerna. Doppler.yaml exists for each application. Whenever you change to a stage, develop, master, local project, it is cumbersome to go to the application directory and type doppler setup and make changes! Is there a solution that I can change at once?

We look forward to hearing from you!

Hi @jieey1140 and welcome to the Doppler Community!

There is indeed a one-time task that avoids having to run doppler setup repeatedly as long as you have a doppler.yaml file in each app folder (make sure it’s not `Doppler.yaml).

Simple change into every app folder, then run:

doppler setup --no-interactive

Now every time you change into an app folder, the Doppler CLI is pre-configured with no need to run doppler setup again.

@jieey1140 As an aside, we have also been discussing some potential modifications to the doppler.yaml file that would allow you to describe your whole monorepo in it. If that gets implemented, then it would allow you to run a single doppler setup to configure your entire project. I don’t know when that support might get added, but it’s definitely on our mind and something we’re looking into!

1 Like

I’m really looking forward to it! I’ll be waiting for the update of the doppler. XD

When you say “Simply change into every app folder” do you really mean EVERY app folder? or did you man like the top level directory.

I use a service called gitpod which is an online ide but every environment instance is ephemeral. You can essentially think of it as a Docker container with a vscode web ui and every time you access the ide you are accessing a new fresh instance with your git repo mounted into it as your workspace.

I currently use a setup.sh that is used to setup the workspace container and so would I need to have a script that recursively does ‘doppler setup --no-interactive’ on every project directory?

I answered my own question just testing it (go figure) and came up with the solution that if I’m using a doppler.yaml file in every folder that needs configuration then I can run

find -name doppler.yaml -execdir doppler setup --no-interactive \;

in my top level directory and it will do this automatically for my entire repo.

Just following up for those unfamiliar with the find command (like me). Make sure to add a . after the find like this:

find . -name doppler.yaml -execdir doppler setup --no-interactive \;

@jieey1140 @JesseRigon @uncvrd You should all be happy to see that this will be making its way into the CLI in the very near future:

2 Likes

@watsonian I’m really looking forward to this update :slight_smile:
Thank you!

1 Like

@watsonian

Could you tell me when the release that reflects the work will be distributed?

I want to remove the legacy of our code.
Thank you :slight_smile:

@jieey1140 It shouldn’t be too much longer here. Probably either early next week or the week after at the latest would be my guess.

1 Like