mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
Add KHOJ_prefix to server admin credentials environment variables
This commit is contained in:
parent
ee005de662
commit
795ec9eb55
2 changed files with 6 additions and 4 deletions
|
@ -43,8 +43,8 @@ services:
|
|||
- POSTGRES_PORT=5432
|
||||
- KHOJ_DJANGO_SECRET_KEY=secret
|
||||
- KHOJ_DEBUG=True
|
||||
- ADMIN_EMAIL=username@example.com
|
||||
- ADMIN_PASSWORD=password
|
||||
- KHOJ_ADMIN_EMAIL=username@example.com
|
||||
- KHOJ_ADMIN_PASSWORD=password
|
||||
command: --host="0.0.0.0" --port=42110 -vv --anonymous-mode
|
||||
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ def initialization():
|
|||
logger.info(
|
||||
"👩✈️ Setting up admin user. These credentials will allow you to configure your server at /server/admin."
|
||||
)
|
||||
email_addr = os.getenv("ADMIN_EMAIL") or input("Email: ")
|
||||
password = os.getenv("ADMIN_PASSWORD") or input("Password: ")
|
||||
email_addr = os.getenv("KHOJ_ADMIN_EMAIL") or input("Email: ")
|
||||
password = os.getenv("KHOJ_ADMIN_PASSWORD") or input("Password: ")
|
||||
admin_user = KhojUser.objects.create_superuser(email=email_addr, username=email_addr, password=password)
|
||||
logger.info(f"👩✈️ Created admin user: {admin_user.email}")
|
||||
|
||||
|
@ -37,6 +37,8 @@ def initialization():
|
|||
return
|
||||
|
||||
try:
|
||||
# Note: gpt4all package is not available on all devices.
|
||||
# So ensure gpt4all package is installed before continuing this step.
|
||||
import gpt4all
|
||||
|
||||
use_offline_model = input("Use offline chat model? (y/n): ")
|
||||
|
|
Loading…
Reference in a new issue