43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
# The version property is now optional in modern Docker Compose
|
|
# version: '3.8'
|
|
|
|
name: wwebjs-api
|
|
|
|
services:
|
|
api:
|
|
image: avoylenko/wwebjs-api:latest
|
|
container_name: wwebjs-api
|
|
restart: always
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
# Core Configuration
|
|
- BASE_WEBHOOK_URL=http://localhost:3000/localCallbackExample
|
|
- MAX_ATTACHMENT_SIZE=5000000 # In bytes (5MB)
|
|
- SET_MESSAGES_AS_SEEN=TRUE
|
|
- ENABLE_LOCAL_CALLBACK_EXAMPLE=TRUE
|
|
- ENABLE_SWAGGER_ENDPOINT=TRUE
|
|
- RECOVER_SESSIONS=TRUE
|
|
|
|
# Security Settings
|
|
# - API_KEY=your_global_api_key_here # Uncomment and set for production
|
|
|
|
# Rate Limiting Configuration
|
|
# - RATE_LIMIT_MAX=1000 # Maximum connections per time window
|
|
# - RATE_LIMIT_WINDOW_MS=1000 # Time window in milliseconds
|
|
|
|
# WhatsApp Web Configuration
|
|
# - WEB_VERSION='2.2328.5' # Specific WhatsApp Web version
|
|
# - WEB_VERSION_CACHE_TYPE=none # Options: local, remote, none
|
|
|
|
# Callback Configuration
|
|
- DISABLED_CALLBACKS=message_ack|message_reaction
|
|
volumes:
|
|
- ./sessions:/usr/src/app/sessions
|
|
# Optional healthcheck
|
|
# healthcheck:
|
|
# test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
|
|
# interval: 30s
|
|
# timeout: 10s
|
|
# retries: 3
|
|
# start_period: 40s
|