Skip to content

docker: configure config.toml using environment variable #751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

navilg
Copy link

@navilg navilg commented Apr 13, 2025

Instead of updating config.toml file to configure Perplexica, We can use environment variables to configure those configs.

For example to configure below section

[MODELS.CUSTOM_OPENAI]
API_KEY = "sk-123456"
API_URL = "http://localopenai:11134"
MODEL_NAME = "meta-llama/llama-4"

we can set envrionment variable MODELS_CUSTOM_OPENAI_API_KEY="sk-123456", MODELS_CUSTOM_OPENAI_API_URL="http://localopenai:11134" and MODELS_CUSTOM_OPENAI_MODEL_NAME="meta-llama/llama-4" by simply setting variable SECTION_WITH_DOTS_REPLACED_WITH_UNDERSCORE_KEYNAME=VALUE

This will fix issue #673 and #750.

- MODELS_CUSTOM_OPENAI_API_KEY=""
- MODELS_CUSTOM_OPENAI_API_URL=""
- MODELS_CUSTOM_OPENAI_MODEL_NAME=""
- MODELS_OLLAMA_API_KEY="" # Ollama API URL - http://host.docker.internal:11434
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be MODELS_OLLAMA_API_URL

- MODELS_CUSTOM_OPENAI_MODEL_NAME=""
- MODELS_OLLAMA_API_KEY="" # Ollama API URL - http://host.docker.internal:11434
- MODELS_DEEPSEEK_API_KEY=""
- MODELS_LM_STUDIO_API_KEY="" # LM Studio API URL - http://host.docker.internal:1234
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be MODELS_LM_STUDIO_API_URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants