mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 12:12:55 -06:00
fix: added docker-compose files example
This commit is contained in:
parent
19039aa281
commit
f847f38812
@ -1,13 +1,13 @@
|
|||||||
# Server URL - Set your application url
|
# Server URL - Set your application url
|
||||||
SERVER_URL='http://localhost:8080'
|
SERVER_URL=http://localhost:8080
|
||||||
|
|
||||||
# Cors - * for all or set separate by commas - ex.: 'yourdomain1.com, yourdomain2.com'
|
# Cors - * for all or set separate by commas - ex.: 'yourdomain1.com, yourdomain2.com'
|
||||||
CORS_ORIGIN='*'
|
CORS_ORIGIN=*
|
||||||
CORS_METHODS='POST,GET,PUT,DELETE'
|
CORS_METHODS=POST,GET,PUT,DELETE
|
||||||
CORS_CREDENTIALS=true
|
CORS_CREDENTIALS=true
|
||||||
|
|
||||||
# Determine the logs to be displayed
|
# Determine the logs to be displayed
|
||||||
LOG_LEVEL='ERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS'
|
LOG_LEVEL=ERROR,WARN,DEBUG,INFO,LOG,VERBOSE,DARK,WEBHOOKS
|
||||||
LOG_COLOR=true
|
LOG_COLOR=true
|
||||||
# Log Baileys - "fatal" | "error" | "warn" | "info" | "debug" | "trace"
|
# Log Baileys - "fatal" | "error" | "warn" | "info" | "debug" | "trace"
|
||||||
LOG_BAILEYS=error
|
LOG_BAILEYS=error
|
||||||
@ -31,9 +31,9 @@ CLEAN_STORE_CONTACTS=true
|
|||||||
CLEAN_STORE_CHATS=true
|
CLEAN_STORE_CHATS=true
|
||||||
|
|
||||||
# Permanent data storage
|
# Permanent data storage
|
||||||
DATABASE_ENABLED=false
|
DATABASE_ENABLED=true
|
||||||
DATABASE_CONNECTION_URI=mongodb://root:root@mongodb:27017/?authSource=admin&readPreference=primary&ssl=false&directConnection=true
|
DATABASE_CONNECTION_URI=mongodb://root:root@mongodb:27017/?authSource=admin&readPreference=primary&ssl=false&directConnection=true
|
||||||
DATABASE_CONNECTION_DB_PREFIX_NAME=evolution
|
DATABASE_CONNECTION_DB_PREFIX_NAME=evdocker
|
||||||
|
|
||||||
# Choose the data you want to save in the application's database or store
|
# Choose the data you want to save in the application's database or store
|
||||||
DATABASE_SAVE_DATA_INSTANCE=false
|
DATABASE_SAVE_DATA_INSTANCE=false
|
||||||
@ -42,9 +42,9 @@ DATABASE_SAVE_MESSAGE_UPDATE=false
|
|||||||
DATABASE_SAVE_DATA_CONTACTS=false
|
DATABASE_SAVE_DATA_CONTACTS=false
|
||||||
DATABASE_SAVE_DATA_CHATS=false
|
DATABASE_SAVE_DATA_CHATS=false
|
||||||
|
|
||||||
REDIS_ENABLED=false
|
REDIS_ENABLED=true
|
||||||
REDIS_URI=redis://redis:6379
|
REDIS_URI=redis://redis:6379
|
||||||
REDIS_PREFIX_KEY=evolution
|
REDIS_PREFIX_KEY=evdocker
|
||||||
|
|
||||||
# Global Webhook Settings
|
# Global Webhook Settings
|
||||||
# Each instance's Webhook URL and events will be requested at the time it is created
|
# Each instance's Webhook URL and events will be requested at the time it is created
|
||||||
@ -77,7 +77,7 @@ WEBHOOK_EVENTS_CONNECTION_UPDATE=true
|
|||||||
WEBHOOK_EVENTS_NEW_JWT_TOKEN=false
|
WEBHOOK_EVENTS_NEW_JWT_TOKEN=false
|
||||||
|
|
||||||
# Name that will be displayed on smartphone connection
|
# Name that will be displayed on smartphone connection
|
||||||
CONFIG_SESSION_PHONE_CLIENT='Evolution API'
|
CONFIG_SESSION_PHONE_CLIENT=EvolutionAPI
|
||||||
# Browser Name = chrome | firefox | edge | opera | safari
|
# Browser Name = chrome | firefox | edge | opera | safari
|
||||||
CONFIG_SESSION_PHONE_NAME=chrome
|
CONFIG_SESSION_PHONE_NAME=chrome
|
||||||
|
|
||||||
@ -88,12 +88,12 @@ QRCODE_LIMIT=30
|
|||||||
# We recommend using the apikey because it will allow you to use a custom token,
|
# We recommend using the apikey because it will allow you to use a custom token,
|
||||||
# if you use jwt, a random token will be generated and may be expired and you will have to generate a new token
|
# if you use jwt, a random token will be generated and may be expired and you will have to generate a new token
|
||||||
# jwt or 'apikey'
|
# jwt or 'apikey'
|
||||||
AUTHENTICATION_TYPE='apikey'
|
AUTHENTICATION_TYPE=apikey
|
||||||
## Define a global apikey to access all instances.
|
## Define a global apikey to access all instances.
|
||||||
### OBS: This key must be inserted in the request header to create an instance.
|
### OBS: This key must be inserted in the request header to create an instance.
|
||||||
AUTHENTICATION_API_KEY='B6D711FCDE4D4FD5936544120E713976'
|
AUTHENTICATION_API_KEY=B6D711FCDE4D4FD5936544120E713976
|
||||||
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true
|
AUTHENTICATION_EXPOSE_IN_FETCH_INSTANCES=true
|
||||||
## Set the secret key to encrypt and decrypt your token and its expiration time
|
## Set the secret key to encrypt and decrypt your token and its expiration time
|
||||||
# seconds - 3600s ===1h | zero (0) - never expires
|
# seconds - 3600s ===1h | zero (0) - never expires
|
||||||
AUTHENTICATION_JWT_EXPIRIN_IN=0
|
AUTHENTICATION_JWT_EXPIRIN_IN=0
|
||||||
AUTHENTICATION_JWT_SECRET='L0YWtjb2w554WFqPG'
|
AUTHENTICATION_JWT_SECRET='L=0YWt]b2w[WF>#>:&E`'
|
||||||
|
@ -13,7 +13,7 @@ COPY ./package.json .
|
|||||||
|
|
||||||
ENV DOCKER_ENV=true
|
ENV DOCKER_ENV=true
|
||||||
|
|
||||||
ENV SERVER_URL='http://localhost:8080'
|
ENV SERVER_URL=http://localhost:8080
|
||||||
|
|
||||||
ENV CORS_ORIGIN=*
|
ENV CORS_ORIGIN=*
|
||||||
ENV CORS_METHODS=POST,GET,PUT,DELETE
|
ENV CORS_METHODS=POST,GET,PUT,DELETE
|
||||||
@ -77,7 +77,7 @@ ENV WEBHOOK_EVENTS_CONNECTION_UPDATE=true
|
|||||||
|
|
||||||
ENV WEBHOOK_EVENTS_NEW_JWT_TOKEN=false
|
ENV WEBHOOK_EVENTS_NEW_JWT_TOKEN=false
|
||||||
|
|
||||||
ENV CONFIG_SESSION_PHONE_CLIENT='Evolution API'
|
ENV CONFIG_SESSION_PHONE_CLIENT=EvolutionAPI
|
||||||
ENV CONFIG_SESSION_PHONE_NAME=chrome
|
ENV CONFIG_SESSION_PHONE_NAME=chrome
|
||||||
|
|
||||||
ENV QRCODE_LIMIT=30
|
ENV QRCODE_LIMIT=30
|
||||||
|
@ -10,6 +10,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- evolution_instances:/evolution/instances
|
- evolution_instances:/evolution/instances
|
||||||
- evolution_store:/evolution/store
|
- evolution_store:/evolution/store
|
||||||
|
networks:
|
||||||
|
- evolution-net
|
||||||
env_file:
|
env_file:
|
||||||
- ./Docker/.env
|
- ./Docker/.env
|
||||||
command: ['node', './dist/src/main.js']
|
command: ['node', './dist/src/main.js']
|
88
docker-compose.yaml.example.complete
Normal file
88
docker-compose.yaml.example.complete
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
version: '3.3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
api:
|
||||||
|
container_name: evolution_api
|
||||||
|
image: evolution/api:local
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
volumes:
|
||||||
|
- evolution_instances:/evolution/instances
|
||||||
|
- evolution_store:/evolution/store
|
||||||
|
networks:
|
||||||
|
- evolution-net
|
||||||
|
env_file:
|
||||||
|
- ./Docker/.env
|
||||||
|
command: ['node', './dist/src/main.js']
|
||||||
|
expose:
|
||||||
|
- 8080
|
||||||
|
|
||||||
|
mongodb:
|
||||||
|
container_name: mongodb
|
||||||
|
image: mongo
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 27017:27017
|
||||||
|
environment:
|
||||||
|
- MONGO_INITDB_ROOT_USERNAME=root
|
||||||
|
- MONGO_INITDB_ROOT_PASSWORD=root
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
volumes:
|
||||||
|
- evolution_mongodb_data:/data/db
|
||||||
|
- evolution_mongodb_configdb:/data/configdb
|
||||||
|
networks:
|
||||||
|
- evolution-net
|
||||||
|
expose:
|
||||||
|
- 27017
|
||||||
|
|
||||||
|
mongo-express:
|
||||||
|
image: mongo-express
|
||||||
|
networks:
|
||||||
|
- evolution-net
|
||||||
|
environment:
|
||||||
|
ME_CONFIG_BASICAUTH_USERNAME: root
|
||||||
|
ME_CONFIG_BASICAUTH_PASSWORD: root
|
||||||
|
ME_CONFIG_MONGODB_SERVER: mongodb
|
||||||
|
ME_CONFIG_MONGODB_ADMINUSERNAME: root
|
||||||
|
ME_CONFIG_MONGODB_ADMINPASSWORD: root
|
||||||
|
ports:
|
||||||
|
- 8081:8081
|
||||||
|
links:
|
||||||
|
- mongodb
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:latest
|
||||||
|
container_name: redis
|
||||||
|
command: >
|
||||||
|
redis-server
|
||||||
|
--port 6379
|
||||||
|
--appendonly yes
|
||||||
|
volumes:
|
||||||
|
- evolution_redis:/data
|
||||||
|
networks:
|
||||||
|
- evolution-net
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
|
||||||
|
rebrow:
|
||||||
|
image: marian/rebrow
|
||||||
|
networks:
|
||||||
|
- evolution-net
|
||||||
|
ports:
|
||||||
|
- 5001:5001
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
evolution_instances:
|
||||||
|
evolution_store:
|
||||||
|
evolution_mongodb_data:
|
||||||
|
evolution_mongodb_configdb:
|
||||||
|
evolution_redis:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
evolution-net:
|
||||||
|
external: true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user