mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 13:18:18 +00:00
Store docker, conda, semantic-search configuration in a config directory
- Improves organization of config files required for application - Declutters the application root directory from configs
This commit is contained in:
@@ -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.
|
||||||
@@ -16,7 +16,7 @@ ARG PORT
|
|||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
# Create the conda environment.
|
# Create the conda environment.
|
||||||
RUN conda env create -f environment.yml
|
RUN conda env create -f config/environment.yml
|
||||||
|
|
||||||
# Use the conda environment we created to run the application.
|
# Use the conda environment we created to run the application.
|
||||||
# To enable the conda env, we cannot simply RUN `conda activate semantic-search`,
|
# To enable the conda env, we cannot simply RUN `conda activate semantic-search`,
|
||||||
@@ -3,7 +3,7 @@ services:
|
|||||||
server:
|
server:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: config/Dockerfile
|
||||||
args:
|
args:
|
||||||
- PORT=8000
|
- PORT=8000
|
||||||
ports:
|
ports:
|
||||||
@@ -30,4 +30,4 @@ services:
|
|||||||
- ./tests/data/models/:/data/models/
|
- ./tests/data/models/:/data/models/
|
||||||
|
|
||||||
# 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=sample_config.yml -vv
|
command: --host="0.0.0.0" --port=8000 -c=config/sample_config.yml -vv
|
||||||
|
|||||||
Reference in New Issue
Block a user