Skip to content

Django chatbot web app for `qary` (Duchess or nlpia-bot)

Notifications You must be signed in to change notification settings

tangibleai/django-qary

Repository files navigation

Django-qary

Web application, API, and Admin dashboard for the QAry cognitive search engine

Docker Containers

  • web: Django, Django REST Framework, nboost
  • nginx: Nginx web server for staticfiles, mediafiles, and /midata
  • postgresql: Database for user credentials, profiles
  • elastic: ElasticSearch document database

Install

If you cloned the repo from gitlab you'll want to ignore your changes to .env.* files:

git update-index --skip-worktree -- .env.*

Then you can edit .env.dev and .env.prod to reflect your network settings and credentials without your secrects being tracked by git.

Building Docker Images

SEE: testdriven.io

Development Environment (typically a Mac laptop with Docker Desktop)

To build and run the dev environment:

$ docker-compose down -v
$ docker-compose -f docker-compose.dev.yml up -d --build

Or:

$ ./scripts/build.sh dev

Production Environment (typically Linux Docker server)

To build and run the production containers:

$ docker-compose down -v

$ docker-compose -f docker-compose.prod.yml up -d --build
$ docker-compose -f docker-compose.prod.yml exec web python manage.py migrate --noinput
$ docker-compose -f docker-compose.prod.yml exec web python manage.py collectstatic --no-input --clear

Or:

$ ./scripts/build.sh prod

Scalable Production Environment

For an actual production deployment with improved security, you'll probably want to use:

- A fully managed database service (such as RDS)
- Non-root user for the db and nginx services

For other production tips, see this Reddit comment.

You can find the original testdrivenio version of the code in their github repo repo.

About

Django chatbot web app for `qary` (Duchess or nlpia-bot)

Resources

Stars

Watchers

Forks

Packages

No packages published