sbin/sync/config.py.tmpl
author ymh <ymh.work@gmail.com>
Fri, 14 Nov 2014 09:34:40 +0100
changeset 354 39c68c53cc91
parent 353 91c44b3fd11f
child 557 f82f7bc4e13f
permissions -rw-r--r--
coreect default values for config.py.tmpl
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
350
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
from fabric.api import env
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
from random import choice
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
env.hosts = ['iri@web.iri.centrepompidou.fr']
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
env.web_group = 'www-data'
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
env.folders = ['log', 'static/media']
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
env.repos = {
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    'ldt': {'repo':"/Users/ymh/dev/workspace/platform", 'src_root':'src/ldt'},
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    'renkanmanager': {'repo':"/Users/ymh/dev/workspace/renkan", 'src_root':'server/python/django'},
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
}
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
env.base_export_path = "~/tmp"
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
env.export_prefix = "hdalab"
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
env.remote_path = {
354
39c68c53cc91 coreect default values for config.py.tmpl
ymh <ymh.work@gmail.com>
parents: 353
diff changeset
    17
    'web':"/iridata/www/iri-research/labs/hdalab/web",
39c68c53cc91 coreect default values for config.py.tmpl
ymh <ymh.work@gmail.com>
parents: 353
diff changeset
    18
    'src':"/iridata/www/iri-research/labs/hdalab/src",
350
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    'virtualenv':"/iridata/virtualenv/hdalab2",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    'build_export':"/iridata/users/iri/tmp/build",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    'venv_export':"/iridata/users/iri/tmp/venv",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
}
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
env.platform_web_module = "hdalab"
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
env.remote_baseline_venv = "/iridata/virtualenv/baseline2.7"
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
env.rsync_filters = {
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    'src' : [
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
        "P .htpasswd",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
        "P .htaccess",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
        "P hdalab/config.py",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    ],
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    'web': [
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
        "+ core",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
        "P .htpasswd",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
        "P .htaccess",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
        "P robots.txt",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
        "P env/***",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
        "P log/***",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
        "P index/***",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
        "P static/media/***",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
        "P crossdomain.xml",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    ],
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    'venv': [
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
        "+ core",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    ]
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
}
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
env.web_relaunch_cmd = "supervisorctl restart hdalab2"
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
env.config = {
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
    'web': {
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
        'base_url': "/hdalab/",
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
        'web_url': 'http://labs.iri-research.org',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
        'db_engine':'postgresql_psycopg2',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
        'db_name':'hdalab',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
        'db_user': 'iriuser',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
        'db_password': '',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
        'db_host': 'sql.iri.centrepompidou.fr',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
        'db_port': 5432,
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
        'log_file' : env.remote_path['web'] + '/log/log.txt',
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
        'secret_key' : ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]),         
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
    },
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
}
4f2fe8731353 add fabfile for server synchronisation
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
353
91c44b3fd11f Correcterrors on missing dbpedia informations
ymh <ymh.work@gmail.com>
parents: 350
diff changeset
    66
env.settings = "hdalab.settings"
91c44b3fd11f Correcterrors on missing dbpedia informations
ymh <ymh.work@gmail.com>
parents: 350
diff changeset
    67