stellar / quickstart

Home of the stellar/quickstart docker image for development and testing
Apache License 2.0
186 stars 206 forks source link

Fix unintended environment variable config passthrough to services #540

Closed leighmcculloch closed 8 months ago

leighmcculloch commented 9 months ago

What

Run supervisord in a new environment that doesn't inherit the shell.

Why

Supervisord and its subprocesses inherit the shell's environment variables.

This is problematic since environment variables are a shared space and there's no guarantee that setting an environment variable would make sense for all sub processes.

We have a case where this has caused problems. The quickstart image uses the NETWORK environment variable, and so does Horizon. For the longest time we have had issues running the quickstart image in certain situations, and it turns out what those situations had in common was they were setting the network of the image via an environment variable NETWORK to a value that worked with the quickstart image start script but didn't work with Horizon. Some values worked for both, some didn't.

We should set environment variables for services explicitly, not broadly based on what the images env vars are.

This will allow us to use the quickstart image as a service in GitHub Actions where it must be configured using env vars, and anywhere folks are already configuring it with env vars.

Close #541