aboutsummaryrefslogtreecommitdiff
blob: 172b78f80922e8796bacc95b996783539fbf23c9 (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# vim:fileencoding=utf8:et:ts=4:sts=4:sw=4:ft=python

# Sample configuration file for okupy project.
# Rename it to local.py and change accordingly the vars

# The listed admins will receive mail notifications
ADMINS = (
    ('admin', 'admin@example.com'),
)

# Select "True" for development environment, "False" for production environment
DEVELOPMENT = True

# Instance name, used in:
# * log dir name: /var/log/okupy/${INSTANCE_NAME}
# * console logs: ${INSTANCE_NAME} ${IP} ${ERROR}
# * prefix of the notification mails: "[${INSTANCE_NAME}] ${TITLE}"
# * (production only): {MEDIA,STATIC}_ROOT: /var/www/${INSTANCE_NAME}/htdocs/{media,static}
# Examples: okupy, okupy-dev, identity.gentoo.org
INSTANCE_NAME = 'okupy-dev'

CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
        # replace with the path to your memcached socket
        'LOCATION': 'unix://home/$USER/okupy/memcached.sock',
    }
}

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': '',                      # Or path to database file if using sqlite3.
        # The following settings are not used with sqlite3:
        'USER': '',
        'PASSWORD': '',
        'HOST': '',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
        'PORT': '',                      # Set to empty string for default.
    }
}

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'secret'

# Variables regarding email sending (host, credentials)
# SERVER_EMAIL = 'user@localhost'
# EMAIL_HOST = 'localhost'
# EMAIL_PORT = '25'
# EMAIL_HOST_USER = 'user'
# EMAIL_HOST_PASSWORD = 'secret'
# EMAIL_USE_TLS = False

# LDAP settings

import ldap

AUTH_LDAP_SERVER_URI = 'ldap://ldap.example.com'

AUTH_LDAP_CONNECTION_OPTIONS = {
    ldap.OPT_REFERRALS: 0,
    ldap.OPT_X_TLS_DEMAND: False,
}

AUTH_LDAP_BIND_DN = ''
AUTH_LDAP_BIND_PASSWORD = ''

AUTH_LDAP_ADMIN_BIND_DN = ''
AUTH_LDAP_ADMIN_BIND_PASSWORD = ''

AUTH_LDAP_USER_ATTR = 'uid'
AUTH_LDAP_USER_BASE_DN = 'ou=people,dc=example,dc=com'

AUTH_LDAP_PERMIT_EMPTY_PASSWORD = False

AUTH_LDAP_START_TLS = False

# objectClasses that are used by any user
AUTH_LDAP_USER_OBJECTCLASS = ['top', 'person', 'organizationalPerson',
                              'inetOrgPerson', 'posixAccount', 'shadowAccount']
# additional objectClasses that are used by developers
AUTH_LDAP_DEV_OBJECTCLASS = ['developerAccount']

# replace with your preferred port
SSH_BIND = ('0.0.0.0', 8022)
# paste your *server* private key here
SSH_SERVER_KEY = '''
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----
'''