File size: 1,366 Bytes
525d39f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# OpenWA - Docker Compose for Development
# Quick Start: docker compose -f docker-compose.dev.yml up -d

services:
  # API Backend
  openwa:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: openwa-api
    ports:
      - '127.0.0.1:2785:2785'
    environment:
      - NODE_ENV=development
      - PORT=2785
      - DATABASE_TYPE=sqlite
      - DATABASE_NAME=/app/data/openwa.sqlite
      - DATABASE_SYNCHRONIZE=true
      - ENGINE_TYPE=whatsapp-web.js
      - SESSION_DATA_PATH=/app/data/sessions
      - PUPPETEER_HEADLESS=true
      - PUPPETEER_ARGS=--no-sandbox,--disable-setuid-sandbox,--disable-dev-shm-usage,--disable-gpu
      - STORAGE_TYPE=local
      - STORAGE_LOCAL_PATH=/app/data/media
      - WEBHOOK_TIMEOUT=10000
      - WEBHOOK_MAX_RETRIES=3
      - QUEUE_ENABLED=false
    volumes:
      - ./data:/app/data
    restart: unless-stopped
    healthcheck:
      test: ['CMD', 'curl', '-f', 'http://localhost:2785/api/health']
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s

  # Dashboard Frontend
  dashboard:
    build:
      context: ./dashboard
      dockerfile: Dockerfile
    container_name: openwa-dashboard
    ports:
      - '127.0.0.1:2886:80'
    depends_on:
      openwa:
        condition: service_healthy
    restart: unless-stopped

networks:
  default:
    name: openwa-network