When I’m running my Docker image locally, I can do docker run -e DATABASE_URL="postgres://user:password@localhost:5432/database example-server
What would be the best practice to pass a DATABASE_URL
as an environment variable to a Docker container in Render?
I know that the environment variables that you can define in the dashboard are used as Docker build args on the build so that is not a secure way which your documentation also states. I also read about the Docker secrets from here but those are only available at build time, right? So if I add a DATABASE_URL
as a secret like that, it will only be visible to the build
command but it won’t be available at run time