Restart Khoj docker services unless stopped. Remove default network

- Seems less aggressive to use unless-stopped versus always.
- Default network is used anyway, so doesn't seem necessary to specify
This commit is contained in:
Debanjum
2025-01-09 21:26:28 +07:00
parent 01d27f5220
commit bb6a6cbe19

View File

@@ -6,8 +6,6 @@ services:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres POSTGRES_DB: postgres
networks:
- default
volumes: volumes:
- khoj_db:/var/lib/postgresql/data/ - khoj_db:/var/lib/postgresql/data/
healthcheck: healthcheck:
@@ -17,14 +15,10 @@ services:
retries: 5 retries: 5
sandbox: sandbox:
image: ghcr.io/khoj-ai/terrarium:latest image: ghcr.io/khoj-ai/terrarium:latest
restart: always restart: unless-stopped
networks:
- default
search: search:
image: docker.io/searxng/searxng:latest image: docker.io/searxng/searxng:latest
restart: always restart: unless-stopped
networks:
- default
volumes: volumes:
- khoj_search:/etc/searxng - khoj_search:/etc/searxng
environment: environment:
@@ -35,7 +29,7 @@ services:
condition: service_healthy condition: service_healthy
# 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:latest if you want to use the prod image. # 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:latest if you want to use the prod image.
image: ghcr.io/khoj-ai/khoj:latest image: ghcr.io/khoj-ai/khoj:latest
restart: always restart: unless-stopped
# 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 official image. # 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 official image.
# build: # build:
# context: . # context: .
@@ -45,11 +39,9 @@ services:
# change the port in the args in the build section, # change the port in the args in the build section,
# as well as the port in the command section to match # as well as the port in the command section to match
- "42110:42110" - "42110:42110"
working_dir: /app
networks:
- default
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
working_dir: /app
volumes: volumes:
- khoj_config:/root/.khoj/ - khoj_config:/root/.khoj/
- khoj_models:/root/.cache/torch/sentence_transformers - khoj_models:/root/.cache/torch/sentence_transformers