diff --git a/.env.example b/.env.example index cb9f3237..30e54c81 100644 --- a/.env.example +++ b/.env.example @@ -169,6 +169,12 @@ WHATSAPP_FILES_FOLDER=/app/.media # volumes: # - './.sessions:/app/sessions' +# +# PostgresSQL Configuration +# https://waha.devlike.pro/docs/how-to/storages/#sessions---postgresql +#WHATSAPP_SESSIONS_POSTGRESQL_URL=postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable +# + # # MongoDB Configuration # https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb diff --git a/docker-compose.yaml b/docker-compose.yaml index 9965d4c1..4459818e 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -22,9 +22,27 @@ services: env_file: - .env - # NOTE: Only if you're using MongoDB - # https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb - # Uncomment this block if you're using MongoDB +# NOTE: Only if you're using PostgreSQL to save sessions +# https://waha.devlike.pro/docs/how-to/storages/#media---postgresql +# postgres: +# image: postgres:17 +# restart: always +# environment: +# POSTGRES_USER: postgres +# POSTGRES_PASSWORD: postgres +# POSTGRES_DB: postgres +# ports: +# - "5432:5432" +# volumes: +# - pg_data:/var/lib/postgresql/data +# command: +# - postgres +# - "-c" +# - "max_connections=1000" + +# NOTE: Only if you're using MongoDB +# https://waha.devlike.pro/docs/how-to/storages/#sessions---mongodb +# Uncomment this block if you're using MongoDB # mongodb: # image: mongo # container_name: mongodb @@ -55,6 +73,6 @@ services: # command: server /data --console-address ":9001" volumes: - # NOTE: Only if you're using MongoDB mongodb_data: {} minio_data: {} + pg_data: {}