forked from LaCodon/continuously_diary_recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbotfile.js
151 lines (129 loc) · 3.42 KB
/
botfile.js
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
const port = process.env.BOTPRESS_PORT || process.env.PORT || 3000
const botUrl = process.env.BOTPRESS_URL || `http://localhost:${port}`
module.exports = {
/*
Botpress minimal supported version.
Don't forget to change it when updating to the next major version.
*/
version: '10.51.1',
/*
The bot's base URL where the bot is reachable from the internet
*/
botUrl: botUrl,
/*
The botpress environment, useful to disambiguate multiple
instances of the same bot running in different environments.
e.g. "dev", "staging", "production"
*/
env: process.env.BOTPRESS_ENV || 'dev',
/*
The port on which the API and UI will be available
*/
port: port,
/*
The IP address which API will listen to (optional)
*/
hostname: process.env.BOTPRESS_HOSTNAME,
/*
Where the content is stored
You can access this property from `bp.dataLocation`
*/
dataDir: process.env.BOTPRESS_DATA_DIR || './.data',
/*
Some modules might generate static configuration files
*/
modulesConfigDir: process.env.BOTPRESS_CONFIG_DIR || './config',
/*
Path to Content Types
*/
contentDir: './src/content',
/*
Path to Flows
*/
flowsDir: './generated/flows',
/*
Path to Content Types Data
*/
contentDataDir: './generated/content',
/*
Path to media / file uploads
*/
mediaDir: './generated/media',
/*
By default logs are enabled and stored in the DB.
Silent mode prevents logs from being displayed in the console
*/
logs: {
enabled: true,
keepDays: 30,
silentMode: false
},
/*
The web server API config
*/
api: {
bodyMaxSize: '1mb'
},
/*
Dialog Manager (DM)
*/
dialogs: {
timeoutInterval: '2m',
janitorInterval: '10s'
},
/*
Botpress collects some anonymous usage statistics to help us put our efforts at the right place
*/
optOutStats: false,
/*
By default ghost content management is only activated in production
*/
ghostContent: {
enabled: process.env.NODE_ENV === 'production' || process.env.BOTPRESS_GHOST_ENABLED
},
heroSection: {
hidden: false
},
/*
Access control of admin panel
*/
login: {
enabled: process.env.NODE_ENV === 'production',
useCloud: process.env.BOTPRESS_CLOUD_ENABLED,
tokenExpiry: '6 hours',
password: process.env.BOTPRESS_PASSWORD || 'password',
maxAttempts: 3,
resetAfter: 10 * 60 * 1000 // 10 minutes
},
/*
Postgres configuration
If Postgres (>= 9.5) is not enabled, Botpress uses SQLite 3 (file-based database)
*/
postgres: {
enabled: process.env.DATABASE === 'postgres',
connection: process.env.DATABASE_URL,
host: process.env.PG_HOST || '127.0.0.1',
port: process.env.PG_PORT || 5432,
user: process.env.PG_USER || '',
password: process.env.PG_PASSWORD || '',
database: process.env.PG_DB || '',
ssl: process.env.PG_SSL || false
},
middleware: {
/*
By default Botpress will automatically load all the middlewares before starting your bot
If this is set to false, you should call `bp.middlewares.load` manually
*/
autoLoading: true
},
/*
This secret key will be used by the encryption / decryption feature.
If left undefined, a new one will be generated each time the bot is started.
The key must be 32 characters long.
*/
secretKey: null,
/*
Prevents Botpress from creating worker threads
*/
disableClusterMode: false
}