diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 0463034a..eca7b774 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -1,5 +1,11 @@ services: api: environment: + NODE_ENV: PROD CHATFLUX_ENV: Production NEW_RELIC_APP_NAME: "Production Evolution API" + LOG_LEVEL: "DEBUG" + CACHE_REDIS_ENABLED: "true" + CACHE_LOCAL_ENABLED: "false" + WEBHOOK_EVENTS_ERRORS: "true" + WEBHOOK_EVENTS_ERRORS_WEBHOOK: ${WEBHOOK_EVENTS_ERRORS_WEBHOOK} diff --git a/docker-compose.staging.yaml b/docker-compose.staging.yaml index 28364812..c9e151d6 100644 --- a/docker-compose.staging.yaml +++ b/docker-compose.staging.yaml @@ -1,5 +1,9 @@ services: api: environment: + NODE_ENV: PROD CHATFLUX_ENV: Staging NEW_RELIC_APP_NAME: "Staging Evolution API" + LOG_LEVEL: "DEBUG" + CACHE_REDIS_ENABLED: "true" + CACHE_LOCAL_ENABLED: "false" diff --git a/docker-compose.yaml b/docker-compose.yaml index b24c3079..29f6b221 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ services: api: container_name: evolution_api - image: atendai/evolution-api:v2.2.3 + image: ghcr.io/ai-chat-os/evolution-api:v2.2.1-redis-on restart: always depends_on: - postgres @@ -12,24 +12,31 @@ services: # 4- If didn't, CTRL+d to logout # 5- Login to the server # 6- Run env |grep -i relic again; + CACHE_REDIS_URI: redis://redis:6379/6 NEW_RELIC_LICENSE_KEY: ${NEW_RELIC_LICENSE_KEY} NEW_RELIC_NO_CONFIG_FILE: true NEW_RELIC_DISTRIBUTED_TRACING_ENABLED: true NEW_RELIC_LOG: stdout NODE_ENV: PROD - ports: - - 8080:8080 volumes: - evolution_instances:/evolution/instances networks: - evolution-net env_file: - .env - expose: - - 8080 extra_hosts: - "host.docker.internal:host-gateway" + redis: + image: redis:7.4.2-alpine + networks: + - evolution-net + container_name: redis + command: > + redis-server --port 6379 --appendonly yes + volumes: + - evolution_redis:/data + postgres: container_name: postgres build: @@ -46,16 +53,6 @@ services: volumes: - postgres_data:/var/lib/postgresql/data - redis: - image: redis:7.4.2-alpine - networks: - - evolution-net - container_name: redis - command: > - redis-server --port 6379 --appendonly yes - volumes: - - evolution_redis:/data - volumes: evolution_instances: postgres_data: diff --git a/newrelic.js b/newrelic.js index dfc6320d..7b037470 100644 --- a/newrelic.js +++ b/newrelic.js @@ -2,7 +2,7 @@ exports.config = { app_name: [`${process.env.CHATFLUX_ENV} Evolution API`], license_key: process.env.NEW_RELIC_LICENSE_KEY, logging: { - level: 'trace' + level: process.env.LOG_LEVEL }, allow_all_headers: true, attributes: {