init project evolution api

This commit is contained in:
Davidson Gomes
2023-06-09 07:48:59 -03:00
commit 2a1c426311
90 changed files with 9820 additions and 0 deletions

132
src/dev-env.yml Normal file
View File

@@ -0,0 +1,132 @@
# ⚠️
# ⚠️ ALL SETTINGS DEFINED IN THIS FILE ARE APPLIED TO ALL INSTANCES.
# ⚠️
# ⚠️ RENAME 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: false # or false
# Temporary data storage
STORE:
CLEANING_INTERVAL: 7200 # seconds === 2h
MESSAGE: true
CONTACTS: true
CHATS: true
# Permanent data storage
DATABASE:
ENABLED: true
CONNECTION:
URI: 'mongodb://root:root@localhost:27017/?authSource=admin&readPreference=primary&ssl=false&directConnection=true'
DB_PREFIX_NAME: evolution
# Choose the data you want to save in the application's database or store
SAVE_DATA:
INSTANCE: true
OLD_MESSAGE: false
NEW_MESSAGE: true
MESSAGE_UPDATE: true
CONTACTS: true
CHATS: true
REDIS:
ENABLED: true
URI: 'redis://localhost:6379/1'
PREFIX_KEY: 'evolution'
# Webhook Settings
WEBHOOK:
# Define a global webhook that will listen for enabled events from all instances
GLOBAL:
URL: <url>
ENABLED: true
# With this option activated, you work with a url per webhook event, respecting the global url and the name of each event
WEBHOOK_BY_EVENTS: true
# Automatically maps webhook paths
# Set the events you want to hear
EVENTS:
APPLICATION_STARTUP: true
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: 'Evolution API'
NAME: Chrome # firefox | edge | opera | safari
# Set qrcode display limit
QRCODE:
LIMIT: 30
# Defines an authentication type for the api
AUTHENTICATION:
TYPE: apikey # or jwt apikey
# Define a global apikey to access all instances
API_KEY:
# OBS: This key must be inserted in the request header to create an instance.
KEY: B6D711FC-DE4D-4FD5-9365-44120E713976
# 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: L=0YWt]b2w[WF>#>:&E`
# Set the instance name and webhook url to create an instance in init the application
INSTANCE:
# With this option activated, you work with a url per webhook event, respecting the local url and the name of each event
WEBHOOK_BY_EVENTS: false
MODE: server # container or server
# if you are using container mode, set the container name and the webhook url to default instance
NAME: evolution
WEBHOOK_URL: <url>