mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 19:03:01 +01:00
Set a default value for the khoj django secret key and add additional guidance for setting environment variables on first run
This commit is contained in:
parent
24b5aaef0a
commit
18254850ab
2 changed files with 35 additions and 1 deletions
|
@ -123,6 +123,40 @@ python -m pip install khoj-assistant
|
||||||
|
|
||||||
##### Local Server Start
|
##### Local Server Start
|
||||||
|
|
||||||
|
Before getting started, configure the following environment variables in your terminal for the first run
|
||||||
|
|
||||||
|
<!-- tabs:start -->
|
||||||
|
|
||||||
|
#### **MacOS**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
export KHOJ_ADMIN_EMAIL=<your-email>
|
||||||
|
export KHOJ_ADMIN_PASSWORD=<your-password>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### **Windows**
|
||||||
|
|
||||||
|
If you're using PowerShell:
|
||||||
|
```shell
|
||||||
|
$env:KHOJ_ADMIN_EMAIL="<your-email>"
|
||||||
|
$env:KHOJ_ADMIN_PASSWORD="<your-password>"
|
||||||
|
```
|
||||||
|
|
||||||
|
If you're using a Unix shell:
|
||||||
|
```shell
|
||||||
|
export KHOJ_ADMIN_EMAIL="<your-email>"
|
||||||
|
export KHOJ_ADMIN_PASSWORD="<your-password>"
|
||||||
|
```
|
||||||
|
|
||||||
|
#### **Linux**
|
||||||
|
|
||||||
|
```shell
|
||||||
|
export KHOJ_ADMIN_EMAIL=<your-email>
|
||||||
|
export KHOJ_ADMIN_PASSWORD=<your-password>
|
||||||
|
```
|
||||||
|
|
||||||
|
<!-- tabs:end -->
|
||||||
|
|
||||||
Run the following command from your terminal to start the Khoj backend and open Khoj in your browser.
|
Run the following command from your terminal to start the Khoj backend and open Khoj in your browser.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
|
@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
|
||||||
|
|
||||||
# SECURITY WARNING: keep the secret key used in production secret!
|
# SECURITY WARNING: keep the secret key used in production secret!
|
||||||
SECRET_KEY = os.getenv("KHOJ_DJANGO_SECRET_KEY")
|
SECRET_KEY = os.getenv("KHOJ_DJANGO_SECRET_KEY", "!secret")
|
||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = os.getenv("KHOJ_DEBUG") == "True"
|
DEBUG = os.getenv("KHOJ_DEBUG") == "True"
|
||||||
|
|
Loading…
Reference in a new issue