fix: adjust in docker-compose file and added all variables in dockerfile

This commit is contained in:
Davidson Gomes 2023-06-10 18:11:28 -03:00
parent 7e7d3a1659
commit f067cb99c8
3 changed files with 40 additions and 43 deletions

1
.gitignore vendored
View File

@ -12,6 +12,7 @@ yarn-error.log*
lerna-debug.log* lerna-debug.log*
/store/* /store/*
/docker-compose-data
# Package # Package
/yarn.lock /yarn.lock

View File

@ -65,11 +65,12 @@ ENV WEBHOOK_EVENTS_GROUP_PARTICIPANTS_UPDATE=$WEBHOOK_EVENTS_GROUP_PARTICIPANTS_
ENV WEBHOOK_EVENTS_NEW_JWT_TOKEN=$WEBHOOK_EVENTS_NEW_JWT_TOKEN ENV WEBHOOK_EVENTS_NEW_JWT_TOKEN=$WEBHOOK_EVENTS_NEW_JWT_TOKEN
ENV CONFIG_SESSION_PHONE_CLIENT=$CONFIG_SESSION_PHONE_CLIENT ENV CONFIG_SESSION_PHONE_CLIENT=$CONFIG_SESSION_PHONE_CLIENT
ENV CONFIG_SESSION_PHONE_NAME=$CONFIG_SESSION_PHONE_NAME ENV CONFIG_SESSION_PHONE_NAME=Chrome
ENV QRCODE_LIMIT=$QRCODE_LIMIT ENV QRCODE_LIMIT=$QRCODE_LIMIT
ENV AUTHENTICATION_TYPE="apikey" # ENV AUTHENTICATION_TYPE="apikey"
ENV AUTHENTICATION_TYPE=$AUTHENTICATION_TYPE
ENV AUTHENTICATION_API_KEY=$AUTHENTICATION_API_KEY ENV AUTHENTICATION_API_KEY=$AUTHENTICATION_API_KEY

View File

@ -12,9 +12,9 @@ services:
context: . context: .
dockerfile: Dockerfile dockerfile: Dockerfile
ports: ports:
- 8080:8083 - 8080:8080
# volumes: volumes:
# - /data/instances:/evolution/instances - /Users/davidson/Projects/atendai-api/instances:/evolution/instances
environment: environment:
# Determine how long the instance should be deleted from memory in case of no connection. # Determine how long the instance should be deleted from memory in case of no connection.
# Default time: 5 minutes # Default time: 5 minutes
@ -26,8 +26,8 @@ services:
- STORE_CONTACTS=true - STORE_CONTACTS=true
- STORE_CHATS=true - STORE_CHATS=true
# Permanent data storage # Permanent data storage
- DATABASE_ENABLED=false - DATABASE_ENABLED=true
- DATABASE_CONNECTION_URI=mongodb://root:root@localhost: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=evolution
# 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
@ -36,8 +36,8 @@ services:
- DATABASE_SAVE_MESSAGE_UPDATE=false - DATABASE_SAVE_MESSAGE_UPDATE=false
- DATABASE_SAVE_DATA_CONTACTS=true - DATABASE_SAVE_DATA_CONTACTS=true
- DATABASE_SAVE_DATA_CHATS=true - DATABASE_SAVE_DATA_CHATS=true
- REDIS_ENABLED=false - REDIS_ENABLED=true
- REDIS_URI=redis://localhost:6379 - REDIS_URI=redis://redis:6379
- REDIS_PREFIX_KEY=evolution - REDIS_PREFIX_KEY=evolution
# Webhook Settings # Webhook Settings
# Define a global webhook that will listen for enabled events from all instances # Define a global webhook that will listen for enabled events from all instances
@ -48,7 +48,7 @@ services:
# Automatically maps webhook paths # Automatically maps webhook paths
# Set the events you want to hear # Set the events you want to hear
- WEBHOOK_EVENTS_STATUS_INSTANCE=true - WEBHOOK_EVENTS_STATUS_INSTANCE=true
- WEBHOOK_EVENTS_APPLICATION_STARTUP=true - WEBHOOK_EVENTS_APPLICATION_STARTUP=false
- WEBHOOK_EVENTS_QRCODE_UPDATED=true - WEBHOOK_EVENTS_QRCODE_UPDATED=true
- WEBHOOK_EVENTS_MESSAGES_SET=true - WEBHOOK_EVENTS_MESSAGES_SET=true
- WEBHOOK_EVENTS_MESSAGES_UPDATE=true - WEBHOOK_EVENTS_MESSAGES_UPDATE=true
@ -69,11 +69,10 @@ services:
- WEBHOOK_EVENTS_NEW_JWT_TOKEN=true - WEBHOOK_EVENTS_NEW_JWT_TOKEN=true
# 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="Evolution API"
- CONFIG_SESSION_PHONE_NAME="Chrome" # firefox | edge | opera | safari
# Set qrcode display limit # Set qrcode display limit
- QRCODE_LIMIT=30 - QRCODE_LIMIT=30
# Defines an authentication type for the api # Defines an authentication type for the api
# - AUTHENTICATION_TYPE="apikey" # jwt or apikey - AUTHENTICATION_TYPE=apikey # jwt or 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
@ -92,35 +91,31 @@ services:
expose: expose:
- 8083 - 8083
# mongodb: mongodb:
# container_name: mongodb container_name: mongodb
# # This image already has a single replica set image: mongo
# image: mongo restart: always
# restart: always volumes:
# # volumes: - /Users/davidson/Projects/atendai-api/docker-compose-data/mongodb:/data/db
# # sudo mkdir -p /data/mongodb ports:
# # - /data/mongodb:/data/db - 27017:27017
# ports: environment:
# - 27017:27017 MONGO_INITDB_ROOT_USERNAME: root
# environment: MONGO_INITDB_ROOT_PASSWORD: root
# MONGO_INITDB_ROOT_USERNAME: root networks:
# # Set a password to access the bank - evolution-net
# MONGO_INITDB_ROOT_PASSWORD: root expose:
# networks: - 27017
# - evolution-net
# expose:
# - 27017
# redis: redis:
# container_name: redis container_name: redis
# image: redis:latest image: redis:latest
# restart: always restart: always
# # volumes: volumes:
# # sudo mkdir -p /data/redis - /Users/davidson/Projects/atendai-api/docker-compose-data/redis:/data
# # - /data/redis:/data ports:
# ports: - 6379:6379
# - 6379:6379 networks:
# networks: - evolution-net
# - evolution-net expose:
# expose: - 6379
# - 6379