This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 153
/
docker-settings.py
56 lines (42 loc) · 1.91 KB
/
docker-settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Importing common provides default settings, see:
# https://github.com/taigaio/taiga-back/blob/master/settings/common.py
from .common import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.getenv('TAIGA_DB_NAME'),
'HOST': os.getenv('TAIGA_DB_HOST'),
'USER': os.getenv('TAIGA_DB_USER'),
'PASSWORD': os.getenv('TAIGA_DB_PASSWORD')
}
}
TAIGA_HOSTNAME = os.getenv('TAIGA_HOSTNAME')
SITES['api']['domain'] = TAIGA_HOSTNAME
SITES['front']['domain'] = TAIGA_HOSTNAME
MEDIA_URL = 'http://' + TAIGA_HOSTNAME + '/media/'
STATIC_URL = 'http://' + TAIGA_HOSTNAME + '/static/'
if os.getenv('TAIGA_SSL').lower() == 'true' or os.getenv('TAIGA_SSL_BY_REVERSE_PROXY').lower() == 'true':
SITES['api']['scheme'] = 'https'
SITES['front']['scheme'] = 'https'
MEDIA_URL = 'https://' + TAIGA_HOSTNAME + '/media/'
STATIC_URL = 'https://' + TAIGA_HOSTNAME + '/static/'
SECRET_KEY = os.getenv('TAIGA_SECRET_KEY')
if os.getenv('RABBIT_PORT') is not None and os.getenv('REDIS_PORT') is not None:
from .celery import *
BROKER_URL = 'amqp://guest:guest@rabbit:5672'
CELERY_RESULT_BACKEND = 'redis://redis:6379/0'
CELERY_ENABLED = True
EVENTS_PUSH_BACKEND = "taiga.events.backends.rabbitmq.EventsPushBackend"
EVENTS_PUSH_BACKEND_OPTIONS = {"url": "amqp://guest:guest@rabbit:5672//"}
if os.getenv('TAIGA_ENABLE_EMAIL').lower() == 'true':
DEFAULT_FROM_EMAIL = os.getenv('TAIGA_EMAIL_FROM')
CHANGE_NOTIFICATIONS_MIN_INTERVAL = 300 # in seconds
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
if os.getenv('TAIGA_EMAIL_USE_TLS').lower() == 'true':
EMAIL_USE_TLS = True
else:
EMAIL_USE_TLS = False
EMAIL_HOST = os.getenv('TAIGA_EMAIL_HOST')
EMAIL_PORT = int(os.getenv('TAIGA_EMAIL_PORT'))
EMAIL_HOST_USER = os.getenv('TAIGA_EMAIL_USER')
EMAIL_HOST_PASSWORD = os.getenv('TAIGA_EMAIL_PASS')