mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-24 17:38:40 -06:00
fix: connection with postgres and redis
This commit is contained in:
parent
1665654676
commit
9c8c2bc4ab
@ -26,7 +26,7 @@ DEL_INSTANCE=false
|
||||
|
||||
# Provider: postgresql | mysql
|
||||
DATABASE_PROVIDER=postgresql
|
||||
DATABASE_CONNECTION_URI='postgresql://user:pass@localhost:5432/evolution?schema=public'
|
||||
DATABASE_CONNECTION_URI=postgresql://user:password@postgres:5432/evolution?schema=public
|
||||
# Client name for the database connection
|
||||
# It is used to separate an API installation from another that uses the same database.
|
||||
DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange
|
||||
@ -211,7 +211,7 @@ DIFY_ENABLED=false
|
||||
# Cache - Environment variables
|
||||
# Redis Cache enabled
|
||||
CACHE_REDIS_ENABLED=true
|
||||
CACHE_REDIS_URI=redis://localhost:6379/6
|
||||
CACHE_REDIS_URI=redis://redis:6379/6
|
||||
CACHE_REDIS_TTL=604800
|
||||
# Prefix serves to differentiate data from one installation to another that are using the same redis
|
||||
CACHE_REDIS_PREFIX_KEY=evolution
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -47,3 +47,5 @@ lerna-debug.log*
|
||||
.tool-versions
|
||||
|
||||
/prisma/migrations/*
|
||||
|
||||
pgadmin/*
|
@ -1,7 +1,7 @@
|
||||
services:
|
||||
api:
|
||||
container_name: evolution_api
|
||||
image: atendai/evolution-api:homolog
|
||||
image: atendai/evolution-api:latest
|
||||
restart: always
|
||||
depends_on:
|
||||
- redis
|
||||
@ -16,9 +16,11 @@ services:
|
||||
- .env
|
||||
expose:
|
||||
- 8080
|
||||
environment:
|
||||
- DATABASE_PROVIDER=postgresql
|
||||
|
||||
redis:
|
||||
image: redis:latest
|
||||
image: redis:alpine
|
||||
networks:
|
||||
- evolution-net
|
||||
container_name: redis
|
||||
@ -29,21 +31,41 @@ services:
|
||||
ports:
|
||||
- 6379:6379
|
||||
|
||||
|
||||
postgres:
|
||||
container_name: postgres
|
||||
image: postgres:15
|
||||
networks:
|
||||
- evolution-net
|
||||
command: ["postgres", "-c", "max_connections=1000"]
|
||||
command: ["postgres", "-c", "max_connections=1000", "-c", "listen_addresses=*"]
|
||||
restart: always
|
||||
ports:
|
||||
- 5432:5432
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=PASSWORD
|
||||
- POSTGRES_USER=user
|
||||
- POSTGRES_PASSWORD=pass
|
||||
- POSTGRES_DB=evolution
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
expose:
|
||||
- 5432
|
||||
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4
|
||||
container_name: pgadmin-container
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: user@example.com
|
||||
PGADMIN_DEFAULT_PASSWORD: adm
|
||||
volumes:
|
||||
- ./pgadmin:/var/lib/pgadmin
|
||||
ports:
|
||||
- "5050:80"
|
||||
depends_on:
|
||||
- postgres
|
||||
networks:
|
||||
- evolution-net
|
||||
|
||||
|
||||
volumes:
|
||||
evolution_instances:
|
||||
|
Loading…
Reference in New Issue
Block a user