-
Notifications
You must be signed in to change notification settings - Fork 25
/
config.py.example
124 lines (101 loc) · 3.9 KB
/
config.py.example
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
########################################
# APP-SPECIFIC CONFIGURATION VARIABLES #
########################################
# The following variables should or must be defined in your
# own application. Create a config.py file, import that config_common
# file as:
#
# from config_hub import *
#
# then define the following variables to fit your needs. You can also override any
# any other variables in this file as required. Variables defined as ValueError() exceptions
# *must* be defined
#
import os
from biothings.utils.loggers import setup_default_log
#* 7. Hub Internals *#
# Define hostname for source database
DATA_SRC_SERVER = 'localhost'
# Define port for source database
DATA_SRC_PORT = 27017
# Define name for source database
DATA_SRC_DATABASE = 'testhub_src'
# Define username for source database connection (or None if not needed)
DATA_SRC_SERVER_USERNAME = ''
# Define password for source database connection (or None if not needed)
DATA_SRC_SERVER_PASSWORD = ''
# Target (merged collection) database connection
# Define hostname for target database (merged collections)
DATA_TARGET_SERVER = 'localhost'
# Define port for target database (merged collections)
DATA_TARGET_PORT = 27017
# Define name for target database (merged collections)
DATA_TARGET_DATABASE = 'testhub'
# Define username for target database connection (or None if not needed)
DATA_TARGET_SERVER_USERNAME = ''
# Define password for target database connection (or None if not needed)
DATA_TARGET_SERVER_PASSWORD = ''
# Define Hub DB connection
# Internal backend. Default to mongodb
# For now, other options are: mongodb, sqlite3, elasticsearch
HUB_DB_BACKEND = {
"module" : "biothings.utils.mongo",
"uri" : "mongodb://localhost:27017",
}
# Hub environment (like, prod, dev, ...)
# Used to generate remote metadata file, like "latest.json", "versions.json"
# If non-empty, this constant will be used to generate those url, as a prefix
# with "-" between. So, if "dev", we'll have "dev-latest.json", etc...
# "" means production
HUB_ENV = ""
#* 2. Datasources *#
# List of package paths for active datasources
ACTIVE_DATASOURCES = []
# Docker connection configuration
# client_url should match the following formats:
# ssh://ubuntu@remote_ip:port
# unix://var/run/docker.sock
# http://remote_ip:port
# https://remote_ip:port
DOCKER_CONFIG = {
"connection_name_1": {
"tls_cert_path": "/path/to/cert.pem",
"tls_key_path": "/path/to/key.pem",
"client_url": "https://remote-docker-host:port"
},
"connection_name_2": {
"client_url": "ssh://user@remote-docker-host"
},
}
#* 3. Folders *#
# Path to a folder to store all downloaded files, logs, caches, etc...
DATA_ARCHIVE_ROOT = "/tmp/testhub/datasources"
# cached data (it None, caches won't be used at all)
CACHE_FOLDER = None
# Path to a folder to store all 3rd party parsers, dumpers, etc...
DATA_PLUGIN_FOLDER = "/tmp/testhub/plugins"
# Path to folder containing diff files
# Usually inside DATA_ARCHIVE_ROOT
DIFF_PATH = os.path.join(DATA_ARCHIVE_ROOT, "diff")
# Path to folder containing release note files
# Usually inside DATA_ARCHIVE_ROOT
RELEASE_PATH = os.path.join(DATA_ARCHIVE_ROOT, "release")
# Define path to folder which will contain log files
# Usually inside DATA_ARCHIVE_ROOT
LOG_FOLDER = os.path.join(DATA_ARCHIVE_ROOT, "logs")
# Provide a default hub logger instance (use setup_default_log(name,log_folder)
logger = setup_default_log("hub", LOG_FOLDER)
GA4_MEASUREMENT_ID = 'G-XXXXXXXXXX'
GA4_API_SECRET = 'XtXXXXXXXXXXVw'
GA4_UID_GENERATOR_VERSION = 1
# *****************************************************************************
# Analytics Settings
# *****************************************************************************
# Google Analytics Account ID
GA_ACCOUNT = 'UA-123123-1'
# Google Measurement ID
GA4_MEASUREMENT_ID = 'G-KXzzzzLBN'
# Google API Secret
GA4_API_SECRET = '62rjfgrzzzzOcf7qNG5JA'
# Google uid gerenator version
GA4_UID_GENERATOR_VERSION = 2