Where can I put custom environment vars that will be exposed to omnibus-gitlab processes?

I’ve tried putting a custom env var in /etc/profile.d/a_script.sh and it shows up on the shell when I echo it.

But I’m trying to use the env var in gitlab for something I customized. And it seems that omnibus-gitlab can’t see the env var.

Where should I put the env var so that omnibus-gitlab can see it? I’m on Ubuntu 16.04.

To clarify, everything works fine locally, and on a dev box where I installed from source. But I also have a prod box that runs omnibus-gitlab. And I built an omnibus-gitlab .deb package from my custom gitlab version. It installs fine and seems to work, but in the logs I’m getting a rails error with the line of my customization saying the env var is nil. So it seems like the env var isn’t being seen by omnibus-gitlab rails.