mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2025-01-18 08:06:16 +01:00
89 lines
2.1 KiB
Django/Jinja
89 lines
2.1 KiB
Django/Jinja
# Django settings for archlinux project.
|
|
|
|
## Debug settings
|
|
DEBUG = False
|
|
TEMPLATE_DEBUG = False
|
|
|
|
PROMETHEUS_METRICS = True
|
|
|
|
## Notification admins
|
|
{% if archweb_admins %}
|
|
ADMINS = (
|
|
{% for admin in archweb_admins %}
|
|
{{ admin }},
|
|
{% endfor %}
|
|
)
|
|
{% else %}
|
|
ADMINS = ()
|
|
{% endif %}
|
|
|
|
SERVER_EMAIL = '{{ archweb_server_email }}'
|
|
EMAIL_HOST = '127.0.0.1'
|
|
EMAIL_PORT = 25
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE' : 'django.db.backends.postgresql_psycopg2',
|
|
'PORT' : 5432,
|
|
'CONN_MAX_AGE' : 600,
|
|
{% if archweb_db_host != 'localhost' %}
|
|
'HOST' : '{{ archweb_db_host }}',
|
|
{% endif %}
|
|
'NAME' : '{{ archweb_db }}',
|
|
'USER' : '{{ archweb_db_site_user }}',
|
|
'PASSWORD': '{{ vault_archweb_db_site_password }}',
|
|
'OPTIONS' : {
|
|
'application_name': 'archweb',
|
|
}
|
|
},
|
|
}
|
|
|
|
## Define cache settings
|
|
CACHES = {
|
|
'default': {
|
|
'BACKEND' : 'django.core.cache.backends.memcached.PyMemcacheCache',
|
|
'LOCATION': 'unix:/run/memcached/archweb.sock',
|
|
'OPTIONS': {
|
|
'no_delay': True,
|
|
'max_pool_size': 4,
|
|
'use_pooling': True,
|
|
'ignore_exc': True,
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
## Use secure session cookies? Make this true if you want all
|
|
## logged-in actions to take place over HTTPS only. If developing
|
|
## locally, you will want to use False.
|
|
SESSION_COOKIE_SECURE = True
|
|
|
|
## static files URL
|
|
STATIC_URL = '/static/'
|
|
|
|
## location for saving dev pictures
|
|
MEDIA_ROOT = '{{ archweb_dir }}/media/img'
|
|
|
|
## web url for serving image files
|
|
MEDIA_URL = '/img/'
|
|
|
|
# Make this unique, and don't share it with anybody.
|
|
SECRET_KEY = '{{ vault_archweb_secret_key }}'
|
|
|
|
# Mailman poster password for announcements
|
|
MAILMAN_PASSWORD = '{{ vault_archweb_mailman_password }}'
|
|
|
|
# Hostnames we allow this site to be served under
|
|
ALLOWED_HOSTS = [{% for host in archweb_allowed_hosts %}'{{ host }}', {% endfor -%}]
|
|
|
|
PGP_SERVER = 'keyserver.ubuntu.com'
|
|
|
|
TIER0_MIRROR_DOMAIN = 'repos.archlinux.org'
|
|
|
|
MASTODON_LINK = 'https://fosstodon.org/@archlinux'
|
|
|
|
# Keep mirrorlogs around for 6 months
|
|
MIRRORLOG_RETENTION_PERIOD = 180
|
|
|
|
# vim: set ts=4 sw=4 et:
|