Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

1.9 KB
Raw Blame
# documentation: https://github.com/rmyndharis/OpenWA
# slogan: Free, open source, self-hosted WhatsApp API gateway with bundled dashboard.
# category: messaging
# tags: whatsapp,api,gateway,messaging,automation,webhooks,open,source
# logo: svgs/openwa.png
# port: 2785

services:
  openwa:
    image: ghcr.io/rmyndharis/openwa:0.23.1
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - DAC_OVERRIDE
      - FOWNER
      - SETGID
      - SETUID
    read_only: true
    tmpfs:
      - /tmp
    pids_limit: ${OPENWA_PIDS_LIMIT:-2048}
    mem_limit: ${OPENWA_MEM_LIMIT:-2g}
    environment:
      - SERVICE_URL_OPENWA_2785
      - NODE_ENV=production
      - HOME=/tmp
      - XDG_CONFIG_HOME=/tmp/.config
      - XDG_CACHE_HOME=/tmp/.cache
      - PORT=2785
      - LOG_LEVEL=${LOG_LEVEL:-info}
      - BASE_URL=${SERVICE_URL_OPENWA}
      - DASHBOARD_URL=${SERVICE_URL_OPENWA}
      - API_MASTER_KEY=${SERVICE_PASSWORD_OPENWA}
      - DATABASE_TYPE=sqlite
      - DATABASE_NAME=./data/openwa.sqlite
      - DATABASE_SYNCHRONIZE=true
      - DATABASE_LOGGING=false
      - ENGINE_TYPE=${ENGINE_TYPE:-whatsapp-web.js}
      - SESSION_DATA_PATH=./data/sessions
      - PUPPETEER_HEADLESS=true
      - PUPPETEER_ARGS=--no-sandbox,--disable-setuid-sandbox,--disable-dev-shm-usage
      - PUPPETEER_EXECUTABLE_PATH=/usr/local/bin/puppeteer-chrome
      - STORAGE_TYPE=local
      - STORAGE_LOCAL_PATH=./data/media
      - REDIS_ENABLED=false
      - QUEUE_ENABLED=false
      - CACHE_ENABLED=false
      - AUTO_START_SESSIONS=${AUTO_START_SESSIONS:-false}
    volumes:
      - openwa-data:/app/data
    healthcheck:
      test:
        - CMD
        - node
        - -e
        - "require('http').get('http://localhost:2785/api/health/ready', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s