Updating env file setup (#125)

* Updating env file setup
* Update qdrant version
This commit is contained in:
Chris Weaver
2023-07-01 15:16:51 -07:00
committed by GitHub
parent ab83f5d17f
commit 24e61a646d
6 changed files with 14 additions and 33 deletions

View File

@@ -28,6 +28,8 @@ Requirements: Docker and docker compose
- This will start Web/API servers, Postgres (backend DB), Qdrant (vector DB), and the background indexing job.
- Downloading packages/requirements may take 20+ minutes depending on your internet connection and whether it needs
to install packages for GPU.
- If you want to adjust any environment variables, either use the `-e` flag or the `--env-file` flag when running the `docker compose` command,
2. To shut down the deployment, run:
@@ -43,7 +45,7 @@ Requirements: Docker and docker compose
Additional steps for user auth and https if you do want to use Docker Compose for production:
1. Set up a `.env` file in this directory with relevant environment variables.
- Refer to env.dev.template and env.prod.template
- Refer to `env.prod.template`
- To turn on user auth, set:
- ENABLE_OAUTH=True
- GOOGLE_OAUTH_CLIENT_ID=\<your GCP API client ID\>

View File

@@ -1,2 +0,0 @@
# This empty .env file is provided for compatibility with older Docker/Docker-Compose installations
# To change default values, check env.dev.template or env.prod.template

View File

@@ -11,8 +11,6 @@ services:
restart: always
ports:
- "8080:8080"
env_file:
- .env
environment:
- POSTGRES_HOST=relational_db
- QDRANT_HOST=vector_db
@@ -30,8 +28,6 @@ services:
- relational_db
- vector_db
restart: always
env_file:
- .env
environment:
- POSTGRES_HOST=relational_db
- QDRANT_HOST=vector_db
@@ -47,8 +43,6 @@ services:
depends_on:
- api_server
restart: always
env_file:
- .env
environment:
- INTERNAL_URL=http://api_server:8080
- DISABLE_AUTH=True
@@ -58,17 +52,13 @@ services:
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
env_file:
- .env
ports:
- "5432:5432"
volumes:
- db_volume:/var/lib/postgresql/data
vector_db:
image: qdrant/qdrant:v1.1.3
image: qdrant/qdrant:v1.3.0
restart: always
env_file:
- .env
environment:
- QDRANT__TELEMETRY_DISABLED=true
ports:
@@ -81,8 +71,6 @@ services:
environment:
- TYPESENSE_API_KEY=${TYPESENSE_API_KEY:-local_dev_typesense}
- TYPESENSE_DATA_DIR=/typesense/storage
env_file:
- .env
ports:
- "8108:8108"
volumes:

View File

@@ -52,12 +52,10 @@ services:
# POSTGRES_USER and POSTGRES_PASSWORD should be set in .env file
env_file:
- .env
ports:
- "5432:5432"
volumes:
- db_volume:/var/lib/postgresql/data
vector_db:
image: qdrant/qdrant:v1.1.3
image: qdrant/qdrant:v1.3.0
restart: always
env_file:
- .env
@@ -73,8 +71,6 @@ services:
- TYPESENSE_DATA_DIR=/typesense/storage
env_file:
- .env
ports:
- "8108:8108"
volumes:
- typesense_volume:/typesense/storage
nginx:

View File

@@ -1,8 +0,0 @@
# Very basic .env file with options that are easy to change. Allows you to deploy everything on a single machine.
# .env is not required unless you wish to change defaults
# Choose between "openai-chat-completion" and "openai-completion"
INTERNAL_MODEL_VERSION=openai-chat-completion
# Use a valid model for the choice above, consult https://platform.openai.com/docs/models/model-endpoint-compatibility
OPENAPI_MODEL_VERSION=gpt-3.5-turbo

View File

@@ -1,5 +1,6 @@
# Fill in the values and copy the contents of this file to .env in the deployment directory
# Some valid default values are provided where applicable, delete the variables which you don't set values for
# Fill in the values and copy the contents of this file to .env in the deployment directory.
# Some valid default values are provided where applicable, delete the variables which you don't set values for.
# Only applicable when using the docker-compose.prod.yml compose file.
# Insert your OpenAI API key here, currently the only Generative AI endpoint for QA that we support is OpenAI
@@ -13,8 +14,12 @@ OPENAI_MODEL_VERSION=gpt-4
# Could be something like danswer.companyname.com. Requires additional setup if not localhost
WEB_DOMAIN=http://localhost:3000
# Required
TYPESENSE_API_KEY=
# If you want to make the postgres / typesense instances a little more secure, modify the below
# Note that the postgres / typesense / qdrant containers do not expose any ports to the outside world,
# so they are already unaccessible unless someone has ssh access to the machine that Danswer is running on
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
TYPESENSE_API_KEY=typesense_api_key
# Currently frontend page doesn't have basic auth, use OAuth if user auth is enabled.
ENABLE_OAUTH=True