How to set arbitrary environment variables for service containers?
Closed this issue · 2 comments
Many of the supported services use environment variables for further configuration. For example you can run harbor ollama serve -h
to see variables for Ollama. I was looking for a way to set the OLLAMA_DEBUG
to 1.
I tried to use harbor config set ollama.debug 1
and while it creates the correct looking variable to the harbor config list
, but inside the ollama container it has HARBOR_
prefix and thus ollama does not use it.
Kudos on trying the config command for that, indeed it's intended for options that Harbor controls directly.
For arbitrary env vars, see this section in the User guide:
https://github.com/av/harbor/wiki/1.-Harbor-User-Guide#using-configuration-files
You can add them to the .env
, there are a few examples there already. Alternatively, target service might have override.env
in its workspace dir to add variables that are scoped to it.
Closing this for now. Feel free to follow up or open a new issue if needed.