openchatai / OpenChat

LLMs custom-chatbots console ⚡
https://openchat.so
MIT License
5.1k stars 639 forks source link

Development Server #201

Closed gururise closed 7 months ago

gururise commented 7 months ago

Trying to follow your guide for debugging via visual studio code, its a little confusing. Can you tell me where I'm going wrong:

  1. make dev-start to get the redit, mysql, qdrant containers running
  2. copy .env.docker to .env and change database host to localhost
  3. run python manage.py runserver from vscode debug.

results in the following: django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111] Connection refused)")

gururise commented 7 months ago

Alright, I think I figured it out:

CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0
DATABASE_NAME=openchat
DATABASE_USER=dbuser
DATABASE_PASSWORD=dbpass
DATABASE_HOST=localhost
DATABASE_PORT=3307

Had to change the database port from 3306 to 3307.