Render

reading time 3 mins

This guide is designed to get you set up with deploying your secrets to Render. We assume you already have deployed your code to Render.

Prerequisites

  • You have an account setup at Render and have deployed some code.

Service Tokens

Follow the first step in the Service Tokens guide to generate a Service Token token.

Copy the generated token to your clipboard, then go to your project in your Render dashboard and click on the tab "Environment".

Click "Add Environment Variable" and input DOPPLER_TOKEN as key and the service token you just generated as value.

[Web Services] Update Start Command

For web service deploys, the last step is to add the Doppler commands to your start command. There are 2 different options to incorporate the Doppler commands:

Option 1: Update the start command in the package.json:

...
"scripts": {
    // Before
    "start": "node app.js",
      
    // After
    "start": "doppler run -- node app.js",
},
 ...

Option 2: Update the start command in Render by navigating to the settings tab in your dashboard:

doppler run -- node app.js

[Static Site] Update Build Command

For static sites, the last step is to add the Doppler commands to your build command. There are 2 different options to incorporate the Doppler commands:

Options 1: Update the build command in your package.json:

...
"scripts": {
    // Before
    "build": "yarn build",

  // After
    "build": "doppler run -- yarn build",
 },
 ...

Options 2: Update your build command in Render by navigating to the settings tab:

doppler run -- yarn build

πŸ‘

Amazing Work!

Now you are all set up on Render. The next time you deploy your secrets will be fetched from Doppler.


Did this page help you?