mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Move Dockerfile to project root to avoid permissions issues. Allocate more memory to docker-compose to avoid OOM
This commit is contained in:
parent
7677465f23
commit
092d0f2f21
3 changed files with 7 additions and 4 deletions
|
@ -8,7 +8,7 @@ RUN apt-get update -y && \
|
||||||
# Add the local code to the /app directory and set it to be the working directory.
|
# Add the local code to the /app directory and set it to be the working directory.
|
||||||
# Since we mount the /app directory as a volume in docker-compose.yml, this
|
# Since we mount the /app directory as a volume in docker-compose.yml, this
|
||||||
# allows us to automatically update the code in the Docker image when it's changed.
|
# allows us to automatically update the code in the Docker image when it's changed.
|
||||||
ADD .. /app
|
ADD . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Get the arguments from the docker-compose environment.
|
# Get the arguments from the docker-compose environment.
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
** Upgrade
|
** Upgrade
|
||||||
#+begin_src shell
|
#+begin_src shell
|
||||||
docker-compose build
|
docker-compose build --pull
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Troubleshooting
|
** Troubleshooting
|
||||||
|
|
|
@ -3,7 +3,7 @@ services:
|
||||||
server:
|
server:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: config/Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
- PORT=8000
|
- PORT=8000
|
||||||
ports:
|
ports:
|
||||||
|
@ -28,6 +28,9 @@ 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: 2GB
|
||||||
# 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/sample_config.yml -vv
|
command: --host="0.0.0.0" --port=8000 -c=config/sample_config.yml -vv
|
||||||
|
|
Loading…
Reference in a new issue