fix: update docker compose
This commit is contained in:
parent
86f1d1688e
commit
1c0d1f63d1
1 changed files with 35 additions and 18 deletions
|
|
@ -1,26 +1,43 @@
|
|||
version: '3.8'
|
||||
# The version property is now optional in modern Docker Compose
|
||||
# version: '3.8'
|
||||
|
||||
name: wwebjs-api
|
||||
|
||||
services:
|
||||
app:
|
||||
container_name: wwebjs_api
|
||||
# build: .
|
||||
image: avoylenko/wwebjs-api:latest # Pull the image from Docker Hub
|
||||
api:
|
||||
image: avoylenko/wwebjs-api:latest
|
||||
container_name: wwebjs-api
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
# - API_KEY=your_global_api_key_here # OPTIONAL
|
||||
# Core Configuration
|
||||
- BASE_WEBHOOK_URL=http://localhost:3000/localCallbackExample
|
||||
- ENABLE_LOCAL_CALLBACK_EXAMPLE=TRUE # OPTIONAL, NOT RECOMMENDED FOR PRODUCTION
|
||||
- MAX_ATTACHMENT_SIZE=5000000 # IN BYTES
|
||||
- SET_MESSAGES_AS_SEEN=TRUE # WILL MARK THE MESSAGES AS READ AUTOMATICALLY
|
||||
# ALL CALLBACKS: auth_failure|authenticated|call|change_state|disconnected|group_join|group_leave|group_update|loading_screen|media_uploaded|message|message_ack|message_create|message_reaction|message_revoke_everyone|qr|ready|contact_changed
|
||||
- DISABLED_CALLBACKS=message_ack|message_reaction # PREVENT SENDING CERTAIN TYPES OF CALLBACKS BACK TO THE WEBHOOK
|
||||
- ENABLE_SWAGGER_ENDPOINT=TRUE # OPTIONAL, ENABLES THE /api-docs ENDPOINT
|
||||
# - RATE_LIMIT_MAX=1000 # OPTIONAL, THE MAXIUM NUMBER OF CONNECTIONS TO ALLOW PER TIME FRAME
|
||||
# - RATE_LIMIT_WINDOW_MS=1000 # OPTIONAL, TIME FRAME FOR WHICH REQUESTS ARE CHECKED IN MS
|
||||
# - WEB_VERSION='2.2328.5' # OPTIONAL, THE VERSION OF WHATSAPP WEB TO USE
|
||||
# - WEB_VERSION_CACHE_TYPE=none # OPTIONAL, DETERMINES WHERE TO GET THE WHATSAPP WEB VERSION(local, remote or none), DEFAULT 'none'
|
||||
# - RECOVER_SESSIONS=TRUE # OPTIONAL, SHOULD WE RECOVER THE SESSION IN CASE OF PAGE FAILURES
|
||||
- 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 # Mount the local ./sessions/ folder to the container's /usr/src/app/sessions folder
|
||||
- ./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
|
||||
|
|
|
|||
Loading…
Reference in a new issue