dev.py 1.71 KB
Newer Older
1
2
3
# Settings for a test/dev GraceDB instance running on a VM with Puppet
# provisioning. Starts with vm.py settings (which inherits from base.py
# settings) and overrides or adds to them.
4
import socket
5
from .base import *
6

7
CONFIG_NAME = "USER TESTING"
8

9
# Debug settings
10
DEBUG = False
11

12
13
14
# Override EMBB email address
# TP (8 Aug 2017): not sure why?
EMBB_MAIL_ADDRESS = 'gracedb@{fqdn}'.format(fqdn=SERVER_FQDN)
15

Tanner Prestegard's avatar
Tanner Prestegard committed
16
# Add middleware
17
debug_middleware = 'debug_toolbar.middleware.DebugToolbarMiddleware'
Tanner Prestegard's avatar
Tanner Prestegard committed
18
MIDDLEWARE += [
19
    #debug_middleware,
20
    #'silk.middleware.SilkyMiddleware',
21
    #'core.middleware.profiling.ProfileMiddleware',
22
    #'core.middleware.admin.AdminsOnlyMiddleware',
23
24
]

25
# Add to installed apps
Tanner Prestegard's avatar
Tanner Prestegard committed
26
INSTALLED_APPS += [
27
    #'debug_toolbar',
28
    #'silk'
29
]
30

31
32
33
# Add testserver to ALLOWED_HOSTS
ALLOWED_HOSTS += ['testserver']

34
35
36
37
38
39
40
41
42
# Settings for django-silk profiler
SILKY_AUTHENTICATION = True
SILKY_AUTHORISATION = True
if 'silk' in INSTALLED_APPS:
    # Needed to prevent RequestDataTooBig for files > 2.5 MB
    # when silk is being used. This setting is typically used to
    # prevent DOS attacks, so should not be changed in production.
    DATA_UPLOAD_MAX_MEMORY_SIZE = 20*(1024**2)

43
44
45
46
47
# Tuple of IPs which are marked as internal, useful for debugging.
# Tanner (5 Dec. 2017): DON'T CHANGE THIS! Django Debug Toolbar exposes
# some headers which we want to keep hidden.  So to be safe, we only allow
# it to be used through this server.  You need to configure a SOCKS proxy
# on your local machine to use DJDT (see admin docs).
Tanner Prestegard's avatar
Tanner Prestegard committed
48
INTERNAL_IPS = [
49
    socket.gethostbyname(SERVER_HOSTNAME),
Tanner Prestegard's avatar
Tanner Prestegard committed
50
]
51
52
53
54
55
56
57
58

LVALERT_OVERSEER_INSTANCES = [
    {
        "lvalert_server": "lvalert-playground.cgca.uwm.edu",
        "listen_port": 8001,
    }
]
SEND_XMPP_ALERTS = True