Web application, API, and Admin dashboard for the QAry cognitive search engine
- 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
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.
SEE: testdriven.io
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
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
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.