Can’t you use the env: section of the container definition for this? That should create an environment variable the Rails app can access.
So like
env:
CUSTOM_ENV: "value"
Otherwise it looks like pups already pipes in env variables on the host, too.