Blueprint: Using string interpolation for docker env variables

Hi, I need to pass a DATABASE_URL env variable to my docker instance. Im using render blueprint for my stack.

services:

  • type: web
    name: my-name
    runtime: image
    image:
    url: fusionauth/fusionauth-app:latest
    region: frankfurt
    plan: free
    healthCheckPath: /api/status
    startCommand: export DATABASE_URL=“jdbc:postgresql://${DATABASE_HOST}-a.frankfurt-postgres.render.com/${DATABASE_NAME}?currentSchema=mySchema”
    envVars:
    • key: DATABASE_HOST
      fromDatabase:
      name: my-database
      property: host
    • key: DATABASE_NAME

Container starts up. All my env variables defined in ‘envVars’ are correctly stored, but the DATABASE_URL from the ‘startCommand’ is not set. How can I achieve this with blueprint? I don’t want to set the DATABASE_URL manually.

I cannot find a similar example in the docs or web.

Thanks in advance!

Hi,

The image runtime doesn’t support a startCommand.

You may be able to achieve it with the dockerCommand, but that would override the ENTRYPOINT and CMD set in the original Dockerfile. so you would need to reproduce the original setup after setting your env var.

Or, you could set the env var manually.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.