From 145a4f360861d45e89fa9c01be813dfd517f70bc Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 16 Jun 2015 15:24:22 +0000 Subject: [PATCH] Add config for taiga-back. --- roles/taiga/tasks/main.yml | 6 +++++ roles/taiga/templates/local.py | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 roles/taiga/templates/local.py diff --git a/roles/taiga/tasks/main.yml b/roles/taiga/tasks/main.yml index 84769f133d..efbc929d06 100644 --- a/roles/taiga/tasks/main.yml +++ b/roles/taiga/tasks/main.yml @@ -112,3 +112,9 @@ - command: sudo -u taiga python3 manage.py collectstatic --noinput chdir=/home/taiga/taiga-back tags: taiga + +- name: copy in our taiga backend config + template: src=local.py dest=/home/taiga/taiga-back/settings/local.py + mode=0640 owner=taiga group=taiga + notify: restart taiga-back + tags: taiga diff --git a/roles/taiga/templates/local.py b/roles/taiga/templates/local.py new file mode 100644 index 0000000000..f1b4d45b04 --- /dev/null +++ b/roles/taiga/templates/local.py @@ -0,0 +1,40 @@ +from .common import * + +MEDIA_URL = "http://209.132.184.50/media/" +STATIC_URL = "http://209.132.184.50/static/" +ADMIN_MEDIA_PREFIX = "http://209.132.184.50/static/admin/" +SITES["front"]["scheme"] = "http" +SITES["front"]["domain"] = "209.132.184.50" + +SECRET_KEY = "{{ taiga_secret_key }}" + +DEBUG = False +TEMPLATE_DEBUG = False +PUBLIC_REGISTER_ENABLED = True + +DEFAULT_FROM_EMAIL = "no-reply@example.com" +SERVER_EMAIL = DEFAULT_FROM_EMAIL + +INSTALLED_APPS += ["taiga_contrib_fas_openid_auth"] +# We monkey patch the rest_framework exception handler to allow us to do +# the 303 redirects that we need to do for openid to finish. +REST_FRAMEWORK['EXCEPTION_HANDLER'] = "taiga_contrib_fas_openid_auth.services.exception_handler" + +EVENTS_PUSH_BACKEND = "taiga.events.backends.rabbitmq.EventsPushBackend" +EVENTS_PUSH_BACKEND_OPTIONS = {"url": "amqp://taiga:{{ taiga_events_password }}@localhost:5672/taiga"} + + +from .celery import * + +BROKER_URL = 'amqp://guest:guest@localhost:5672//' +CELERY_RESULT_BACKEND = 'redis://localhost:6379/0' +CELERY_ENABLED = True + +# Uncomment and populate with proper connection parameters +# for enable email sending. +#EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" +#EMAIL_USE_TLS = False +#EMAIL_HOST = "localhost" +#EMAIL_HOST_USER = "" +#EMAIL_HOST_PASSWORD = "" +#EMAIL_PORT = 25