/
setup.env
48 lines (42 loc) · 1.71 KB
/
setup.env
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
## Set system endpoints
# Set CMBEETLE_ROOT based on path of setup.env relatively
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}`
export CMBEETLE_ROOT=`cd $SCRIPT_DIR && cd .. && pwd`
export CBSTORE_ROOT=$CMBEETLE_ROOT
export CBLOG_ROOT=$CMBEETLE_ROOT
#export CBSPIDER_CALLMETHOD=REST
#export CBSPIDER_REST_URL=http://localhost:1024/spider
#export CBTUMBLEBUG_CALLMETHOD=REST
#export CBTUMBLEBUG_REST_URL=http://localhost:1323/tumblebug
## Logger configuration
# Set log file path (default logfile path: ./cm-beetle.log)
export LOGFILE_PATH=cm-beetle.log
export LOGFILE_MAXSIZE=10
export LOGFILE_MAXBACKUPS=3
export LOGFILE_MAXAGE=30
export LOGFILE_COMPRESS=false
# Set log level, such as trace, debug info, warn, error, fatal, and panic
export LOGLEVEL=debug
# Set log writer, such as file, stdout, or both
export LOGWRITER=both
# Set execution environment, such as development or production
export NODE_ENV=development
## Set internal DB config (SQLlite)
export DB_URL=localhost:3306
export DB_DATABASE=cm_beetle
export DB_USER=cm_beetlee
export DB_PASSWORD=cm_beetle
## Set API access config
# API_ALLOW_ORIGINS (ex: https://cloud-barista.org,http://localhost:8080 or * for all)
export API_ALLOW_ORIGINS=*
# Set API_AUTH_ENABLED=true currently for basic auth for all routes (i.e., url or path)
export API_AUTH_ENABLED=true
export API_USERNAME=default
export API_PASSWORD=default
## Set period for auto control goroutine invocation
export AUTOCONTROL_DURATION_MS=10000
## Set SELF_ENDPOINT, to access Swagger API dashboard outside (Ex: export SELF_ENDPOINT=x.x.x.x:8056)
export SELF_ENDPOINT=localhost:8056
## Environment variables that you don't need to touch
# Swagger UI API document file path
export APIDOC_PATH=$CMBEETLE_ROOT/api/swagger.json