forked from code-chat-br/whatsapp-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev-env.yml
153 lines (138 loc) · 6.2 KB
/
dev-env.yml
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
152
153
# ┌──────────────────────────────────────────────────────────────────────────────┐
# │ @author jrCleber |
# │ @filename dev-env.yml │
# │ Developed by: Cleber Wilson │
# │ File name: dev-env.yml │
# │ Creation date: Nov 27, 2022 │
# │ Contact: [email protected] │
# ├──────────────────────────────────────────────────────────────────────────────┤
# │ @copyright © Cleber Wilson 2022. All rights reserved. │
# │ Licensed under the Apache License, Version 2.0 │
# │ │
# │ @license "https://github.com/code-chat-br/whatsapp-api/blob/main/LICENSE" │
# │ │
# │ You may not use this file except in compliance with the License. │
# │ You may obtain a copy of the License at │
# │ │
# │ http://www.apache.org/licenses/LICENSE-2.0 │
# │ │
# │ Unless required by applicable law or agreed to in writing, software │
# │ distributed under the License is distributed on an "AS IS" BASIS, │
# │ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. │
# │ │
# │ See the License for the specific language governing permissions and │
# │ limitations under the License. │
# ├──────────────────────────────────────────────────────────────────────────────┤
# │ @important │
# │ For any future changes to the code in this file, it is recommended to │
# │ contain, together with the modification, the information of the developer │
# │ who changed it and the date of modification. │
# └──────────────────────────────────────────────────────────────────────────────┘
# ⚠️
# ⚠️ ALL SETTINGS DEFINED IN THIS FILE ARE APPLIED TO ALL INSTANCES.
# ⚠️
# ⚠️ COPY THIS FILE TO env.yml
# Choose the server type for the application
SERVER:
TYPE: http # https
PORT: 8083 # 443
CORS:
ORIGIN:
- '*'
# - yourdomain.com
METHODS:
- POST
- GET
- PUT
- DELETE
CREDENTIALS: true
# Install ssl certificate and replace string <domain> with domain name
# Access: https://certbot.eff.org/instructions?ws=other&os=ubuntufocal
SSL_CONF:
PRIVKEY: /etc/letsencrypt/live/<domain>/privkey.pem
FULLCHAIN: /etc/letsencrypt/live/<domain>/fullchain.pem
# Determine the logs to be displayed
LOG:
LEVEL:
- ERROR
- WARN
- DEBUG
- INFO
- LOG
- VERBOSE
- DARK
COLOR: true
# Determine how long the instance should be deleted from memory in case of no connection.
# Default time: 5 minutes
# If you don't even want an expiration, enter the value false
DEL_INSTANCE: 5 # or false
# Temporary data storage
STORE:
CLEANING_INTERVAL: 7200 # seconds === 2h
MESSAGE: true
CONTACTS: false
CHATS: false
# Permanent data storage
DATABASE:
ENABLED: false
CONNECTION:
URI: 'mongodb://<USER>:<PASSWORD>@<HOST>/?authSource=admin&readPreference=primary&ssl=false&directConnection=true'
DB_PREFIX_NAME: codechat
# Choose the data you want to save in the application's database or store
SAVE_DATA:
INSTANCE: false
OLD_MESSAGE: false
NEW_MESSAGE: true
MESSAGE_UPDATE: true
CONTACTS: true
CHATS: true
REDIS:
ENABLED: false
URI: 'redis://<HOST>'
PREFIX_KEY: 'codechat'
# Webhook Settings
WEBHOOK:
# Define a global webhook that will listen for enabled events from all instances
GLOBAL:
URL: <url>
ENABLED: false
# Automatically maps webhook paths
# Set the events you want to hear
EVENTS:
QRCODE_UPDATED: true
MESSAGES_SET: true
MESSAGES_UPSERT: true
MESSAGES_UPDATE: true
SEND_MESSAGE: true
CONTACTS_SET: true
CONTACTS_UPSERT: true
CONTACTS_UPDATE: true
PRESENCE_UPDATE: true
CHATS_SET: true
CHATS_UPSERT: true
CHATS_UPDATE: true
CHATS_DELETE: true
GROUPS_UPSERT: true
GROUP_UPDATE: true
GROUP_PARTICIPANTS_UPDATE: true
CONNECTION_UPDATE: true
# This event fires every time a new token is requested via the refresh route
NEW_JWT_TOKEN: true
CONFIG_SESSION_PHONE:
# Name that will be displayed on smartphone connection
CLIENT: CodeChat
NAME: Chrome # firefox | edge | opera | safari
# Set qrcode display limit
QRCODE:
LIMIT: 6
# Defines an authentication type for the api
AUTHENTICATION:
TYPE: jwt # or apikey->(deprecated)
# Define a global apikey to access all instances
# OBS: This key must be inserted in the request header to create an instance.
API_KEY: zYzP7ocstxh3SJ23D4FZTCu4ehnM8v4hu
# Set the secret key to encrypt and decrypt your token and its expiration time.
JWT:
EXPIRIN_IN: 0 # seconds - 3600s === 1h | zero (0) - never expires
SECRET: 3RFYiiRmvNiokSBrLZzx
SESSION_SECRET: W0NvZGVDaGF0XTpbU2Vzc2lvbiBTZWNyZXQgS2V5Ll0=