Add Makefile targets to run testing instance against local

Docker REDIS and Postgres services

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-03-09 01:03:44 -04:00
parent 5abb678433
commit 286e9517c3
2 changed files with 33 additions and 0 deletions

View File

@@ -115,6 +115,23 @@ runserver_plus:
shell_plus:
./manage.py shell_plus --settings=mayan.settings.development
docker_services_on:
docker run -d --name redis -p 6379:6379 redis
docker run -d --name postgres -p 5432:5432 postgres
while ! nc -z 127.0.0.1 6379; do sleep 1; done
while ! nc -z 127.0.0.1 5432; do sleep 1; done
sleep 1
./manage.py initialsetup --settings=mayan.settings.testing.docker
docker_services_off:
docker stop postgres redis
docker rm postgres redis
docker_services_frontend:
./manage.py runserver --settings=mayan.settings.testing.docker
docker_services_worker:
./manage.py celery worker --settings=mayan.settings.testing.docker -B -l INFO
# Security

View File

@@ -0,0 +1,16 @@
from __future__ import absolute_import
from ..production import * # NOQA
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'HOST': 'localhost',
'PORT': '5432',
}
}
BROKER_URL = 'redis://127.0.0.1:6379/0'
CELERY_RESULT_BACKEND = 'redis://127.0.0.1:6379/0'