Use published docker image to run khoj service using docker-compose

This commit is contained in:
Debanjum Singh Solanky 2022-08-04 02:17:01 +03:00
parent ee65809dc6
commit 84adf0c568
2 changed files with 2 additions and 9 deletions

View file

@ -1,5 +1,6 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM python:3.10-slim-bullseye FROM python:3.10-slim-bullseye
LABEL org.opencontainers.image.source https://github.com/debanjum/khoj
# Install System Dependencies # Install System Dependencies
RUN apt-get update -y && \ RUN apt-get update -y && \

View file

@ -1,11 +1,7 @@
version: "3.9" version: "3.9"
services: services:
server: server:
build: image: ghcr.io/debanjum/khoj:latest
context: .
dockerfile: Dockerfile
args:
- PORT=8000
ports: ports:
# If changing the local port (left hand side), no other changes required. # If changing the local port (left hand side), no other changes required.
# If changing the remote port (right hand side), # If changing the remote port (right hand side),
@ -29,9 +25,5 @@ services:
# You can set these volumes to point to empty directories on host # You can set these volumes to point to empty directories on host
- ./tests/data/embeddings/:/data/embeddings/ - ./tests/data/embeddings/:/data/embeddings/
- ./tests/data/models/:/data/models/ - ./tests/data/models/:/data/models/
deploy:
resources:
limits:
memory: 8g
# Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/ # Use 0.0.0.0 to explicitly set the host ip for the service on the container. https://pythonspeed.com/articles/docker-connection-refused/
command: --host="0.0.0.0" --port=8000 -c=config/khoj_sample.yml -vv command: --host="0.0.0.0" --port=8000 -c=config/khoj_sample.yml -vv