2022-01-24 04:44:38 +00:00
services :
2023-10-26 16:42:29 +00:00
database :
image : ankane/pgvector
ports :
- "5432:5432"
environment :
POSTGRES_USER : postgres
POSTGRES_PASSWORD : postgres
POSTGRES_DB : postgres
volumes :
- khoj_db:/var/lib/postgresql/data/
2023-11-14 20:21:26 +00:00
healthcheck :
test : [ "CMD-SHELL" , "pg_isready -U postgres" ]
interval : 30s
timeout : 10s
retries : 5
2024-11-01 18:50:58 +00:00
sandbox :
image : ghcr.io/khoj-ai/terrarium:latest
ports :
- "8080:8080"
2022-01-24 05:14:01 +00:00
server :
2023-11-14 20:21:26 +00:00
depends_on :
database :
condition : service_healthy
2024-12-06 02:16:01 +00:00
# Use the following line to use the latest version of khoj. Otherwise, it will build from source. Set this to ghcr.io/khoj-ai/khoj-cloud if you want to use the prod image.
2023-06-21 07:13:21 +00:00
image : ghcr.io/khoj-ai/khoj:latest
2023-10-26 16:42:29 +00:00
# Uncomment the following line to build from source. This will take a few minutes. Comment the next two lines out if you want to use the offiicial image.
# build:
# context: .
2022-01-24 04:44:38 +00:00
ports :
2022-01-24 19:10:18 +00:00
# If changing the local port (left hand side), no other changes required.
2023-02-17 18:07:59 +00:00
# If changing the remote port (right hand side),
# change the port in the args in the build section,
2022-01-24 19:10:18 +00:00
# as well as the port in the command section to match
2023-07-11 03:16:25 +00:00
- "42110:42110"
2022-01-24 19:10:18 +00:00
working_dir : /app
2022-01-24 04:44:38 +00:00
volumes :
2023-09-09 00:07:26 +00:00
- khoj_config:/root/.khoj/
2023-10-26 20:15:31 +00:00
- khoj_models:/root/.cache/torch/sentence_transformers
2024-11-17 07:53:11 +00:00
- khoj_models:/root/.cache/huggingface
2022-01-24 19:10:18 +00:00
# Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/
2023-10-26 16:42:29 +00:00
environment :
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
2023-11-14 20:21:26 +00:00
- KHOJ_DJANGO_SECRET_KEY=secret
2024-03-01 15:46:57 +00:00
- KHOJ_DEBUG=False
2023-11-15 00:09:56 +00:00
- KHOJ_ADMIN_EMAIL=username@example.com
- KHOJ_ADMIN_PASSWORD=password
2024-11-17 07:53:11 +00:00
# Uncomment line below to use with Ollama running on your local machine at localhost:11434.
# Change URL to use with other OpenAI API compatible providers like VLLM, LMStudio etc.
# - OPENAI_API_BASE=http://host.docker.internal:11434/v1/
#
# Uncomment appropriate lines below to use chat models by OpenAI, Anthropic, Google.
2024-09-19 19:58:22 +00:00
# Ensure you set your provider specific API keys.
# ---
# - OPENAI_API_KEY=your_openai_api_key
# - GEMINI_API_KEY=your_gemini_api_key
# - ANTHROPIC_API_KEY=your_anthropic_api_key
2024-11-17 07:53:11 +00:00
#
2024-11-17 22:34:11 +00:00
# Uncomment appropriate lines below to enable web results with Khoj
# Ensure you set your provider specific API keys.
# ---
# Free, Slower API. Does both web search and webpage read. Get API key from https://jina.ai/
# - JINA_API_KEY=you_jina_api_key
# Paid, Fast API. Only does web search. Get API key from https://serper.dev/
# - SERPER_DEV_API_KEY=your_serper_dev_api_key
# Paid, Fast, Open API. Only does webpage read. Get API key from https://firecrawl.dev/
# - FIRECRAWL_API_KEY=your_firecrawl_api_key
# Paid, Fast, Higher Read Success API. Only does webpage read. Get API key from https://olostep.com/
# - OLOSTEP_API_KEY=your_olostep_api_key
#
2024-09-19 19:58:22 +00:00
# Uncomment the necessary lines below to make your instance publicly accessible.
# Replace the KHOJ_DOMAIN with either your domain or IP address (no http/https prefix).
# Proceed with caution, especially if you are using anonymous mode.
# ---
2024-06-01 16:18:43 +00:00
# - KHOJ_NO_HTTPS=True
# - KHOJ_DOMAIN=192.168.0.104
2024-09-19 19:58:22 +00:00
# - KHOJ_DOMAIN=khoj.example.com
2024-11-12 03:15:30 +00:00
# Uncomment the line below to disable telemetry.
# Telemetry helps us prioritize feature development and understand how people are using Khoj
# Read more at https://docs.khoj.dev/miscellaneous/telemetry
# - KHOJ_TELEMETRY_DISABLE=True
2024-12-06 02:16:01 +00:00
# Uncomment this line when you're using the official ghcr.io/khoj-ai/khoj-cloud prod image.
2024-09-19 02:19:27 +00:00
command : --host="0.0.0.0" --port=42110 -vv --anonymous-mode --non-interactive
2023-09-09 00:07:26 +00:00
volumes :
khoj_config :
2023-10-26 16:42:29 +00:00
khoj_db :
2023-10-26 20:15:31 +00:00
khoj_models :