๐Ÿ“— Ansible playbooks and roles for building an idempotent, interconnected and scalable infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-playbooks/roles/seafile/templates/seahub_settings.j2

37 lines
1.1 KiB

2 years ago
# -*- coding: utf-8 -*-
SECRET_KEY = "b'np@1u5zmqzb)at5^n7@so19b%a42kd=kdx+xcum!z)le9g1zet'"
SERVICE_URL = "{{ host_url }}"
FILE_SERVER_ROOT = "{{ host_url }}/seafhttp"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '{{ seaf_db_seahub }}',
'USER': '{{ seaf_db_user }}',
'PASSWORD': '{{ seaf_db_password }}',
'HOST': '127.0.0.1',
'PORT': '3306',
'OPTIONS': {'charset': 'utf8mb4'},
}
}
CACHES = {
'default': {
'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
},
}
{% for option in (seaf_cfg.seahub | d({}) | dict2items) -%}
{% if option.value is boolean -%}
{{- option.key | upper }} = {{ 'True' if option.value else 'False' }}
{% elif option.value is string -%}
{{- option.key | upper }} = '{{ option.value }}'
{% elif (option.value | type_debug == 'list') -%}
{{- option.key | upper }} = ('{{ option.value | join("', '") }}')
{% else -%}
{{- option.key | upper }} = {{ option.value }}
{% endif -%}
{% endfor -%}