2022-01-23 23:44:38 -05:00
version : "3.9"
services :
2023-10-26 09:42:29 -07: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/
2022-01-24 00:14:01 -05:00
server :
2023-10-26 09:42:29 -07:00
# Use the following line to use the latest version of khoj. Otherwise, it will build from source.
2023-06-21 00:13:21 -07:00
image : ghcr.io/khoj-ai/khoj:latest
2023-10-26 09:42:29 -07: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-23 23:44:38 -05:00
ports :
2022-01-24 14:10:18 -05:00
# If changing the local port (left hand side), no other changes required.
2023-02-17 12:07:59 -06:00
# If changing the remote port (right hand side),
# change the port in the args in the build section,
2022-01-24 14:10:18 -05:00
# as well as the port in the command section to match
2023-07-10 20:16:25 -07:00
- "42110:42110"
2022-01-24 14:10:18 -05:00
working_dir : /app
2022-01-23 23:44:38 -05:00
volumes :
2022-01-24 14:10:18 -05:00
- .:/app
2023-02-17 12:07:59 -06:00
# These mounted volumes hold the raw data that should be indexed for search.
2022-01-24 14:10:18 -05:00
# The path in your local directory (left hand side)
# points to the files you want to index.
# The path of the mounted directory (right hand side),
# must match the path prefix in your config file.
2022-08-04 22:29:57 +03:00
- ./tests/data/org/:/data/org/
2022-01-29 01:32:12 -05:00
- ./tests/data/images/:/data/images/
2022-07-21 21:54:30 +04:00
- ./tests/data/markdown/:/data/markdown/
2023-06-01 09:55:48 +05:30
- ./tests/data/pdf/:/data/pdf/
2022-01-29 01:32:12 -05:00
# Embeddings and models are populated after the first run
# You can set these volumes to point to empty directories on host
2023-07-30 02:07:33 -07:00
- ./tests/data/embeddings/:/root/.khoj/content/
- ./tests/data/models/:/root/.khoj/search/
2023-09-08 17:07:26 -07:00
- khoj_config:/root/.khoj/
2023-10-26 13:15:31 -07:00
- khoj_models:/root/.cache/torch/sentence_transformers
2022-01-24 14:10:18 -05: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 09:42:29 -07:00
environment :
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
2023-10-26 13:15:31 -07:00
- GOOGLE_CLIENT_SECRET=bar
- GOOGLE_CLIENT_ID=foo
2023-09-08 17:07:26 -07:00
command : --host="0.0.0.0" --port=42110 -vv
volumes :
khoj_config :
2023-10-26 09:42:29 -07:00
khoj_db :
2023-10-26 13:15:31 -07:00
khoj_models :