diff --git a/.env.gowa.example b/.env.gowa.example new file mode 100644 index 0000000..fc43d35 --- /dev/null +++ b/.env.gowa.example @@ -0,0 +1,17 @@ +# Salin ke .env.gowa lalu isi nilainya. File .env.gowa tidak di-commit. +# +# Login dashboard GOWA (Basic Auth): user:password +GOWA_BASIC_AUTH=admin:ganti-password-kuat + +# Port dan interface dashboard/API GOWA +GOWA_PORT=3000 +GOWA_BIND=0.0.0.0 + +# URL webhook OPEN-ISP dari dalam container. +# App di host yang sama : http://host.containers.internal:3001/api/webhook/gowa +# App di compose network : http://open-isp:3001/api/webhook/gowa +GOWA_WEBHOOK_URL=http://host.containers.internal:3001/api/webhook/gowa + +# Samakan dengan setting gowa_webhook_secret di OPEN-ISP. +# Buat dengan: openssl rand -hex 32 +GOWA_WEBHOOK_SECRET=ganti-dengan-hasil-openssl-rand-hex-32 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b7800b..235662d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Format mengikuti [Keep a Changelog](https://keepachangelog.com/) dan [Semantic Versioning](https://semver.org/). +## [0.5.7] — 2026-11-05 — "gowa-podman" + +### Ditambahkan +- `docker-compose.gowa.yml` + `.env.gowa.example`: menjalankan **GOWA** (WhatsApp gateway + dashboard/UI) dengan Docker atau Podman Compose, termasuk webhook ke OPEN-ISP dan Basic Auth. + ## [0.5.6] — 2026-11-05 — "qris-hangus" ### Diperbaiki diff --git a/README.md b/README.md index 4aefb17..b2059ed 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@

Lisensi: ISC - Versi 0.5.6 (qris-hangus) + Versi 0.5.7 (gowa-podman) Node.js >= 20 Docker Demo @@ -106,6 +106,19 @@ docker compose up -d Buka **http://localhost:3001** — login awal `admin` / `demo-isp123` (**segera ganti password**). Data tersimpan di volume `docker-data/` (settings, database, logs, uploads, sesi WhatsApp). +### WhatsApp gateway GOWA + UI (Podman / Docker Compose) + +GOWA dijalankan sebagai container terpisah, lengkap dengan dashboard/scan QR bawaan: + +```bash +cp .env.gowa.example .env.gowa # isi GOWA_BASIC_AUTH + GOWA_WEBHOOK_SECRET +podman compose --env-file .env.gowa -f docker-compose.gowa.yml up -d +``` + +Buka dashboard di **http://:3000** (login Basic Auth), lalu scan QR. +Di OPEN-ISP → **Admin → WhatsApp**: pilih gateway **GOWA**, isi base URL `http://127.0.0.1:3000` +(app di host yang sama), username/password, dan **webhook secret** yang sama dengan `.env.gowa`. + ### Manual (Node.js ≥ 20, disarankan 22 LTS) ```bash diff --git a/docker-compose.gowa.yml b/docker-compose.gowa.yml new file mode 100644 index 0000000..983644f --- /dev/null +++ b/docker-compose.gowa.yml @@ -0,0 +1,54 @@ +# ───────────────────────────────────────────────────────────────────────────── +# GOWA — WhatsApp gateway + dashboard (UI) untuk OPEN-ISP +# +# Kompatibel dengan docker compose maupun podman compose. +# +# 1. Siapkan kredensial: +# cp .env.gowa.example .env.gowa +# # isi GOWA_BASIC_AUTH dan GOWA_WEBHOOK_SECRET (openssl rand -hex 32) +# +# 2. Jalankan: +# podman compose --env-file .env.gowa -f docker-compose.gowa.yml up -d +# # atau: docker compose --env-file .env.gowa -f docker-compose.gowa.yml up -d +# +# 3. Buka dashboard: http://:3000 (login Basic Auth di atas) +# Scan QR di sana, atau dari OPEN-ISP → WhatsApp. +# +# 4. Di OPEN-ISP (Admin → WhatsApp → GOWA): +# base URL : http://127.0.0.1:3000 (app di host yang sama) +# username/pass : sesuai GOWA_BASIC_AUTH +# webhook secret: sama dengan GOWA_WEBHOOK_SECRET +# gateway : GOWA +# +# Catatan: +# - UI (gowa-ui) diunduh otomatis oleh GOWA saat start; butuh internet. +# Server tanpa internet: set APP_UI_AUTO_UPDATE=false lalu taruh +# gowa-ui.html di volume gowa_storages (folder /app/storages/ui). +# - host.containers.internal = IP host dari dalam container (Podman/Docker). +# Bila tidak resolve, ganti GOWA_WEBHOOK_URL dengan IP LAN host, +# mis. http://10.44.33.51:3001/api/webhook/gowa +# ───────────────────────────────────────────────────────────────────────────── +services: + gowa: + image: aldinokemal2104/go-whatsapp-web-multidevice:v9.8.0 + container_name: gowa + restart: unless-stopped + ports: + - "${GOWA_BIND:-0.0.0.0}:${GOWA_PORT:-3000}:3000" + volumes: + - gowa_storages:/app/storages + - gowa_statics:/app/statics + environment: + APP_PORT: "3000" + APP_OS: "OPEN-ISP" + APP_BASIC_AUTH: "${GOWA_BASIC_AUTH:?isi GOWA_BASIC_AUTH=user:password}" + APP_UI_ENABLED: "${GOWA_UI_ENABLED:-true}" + APP_UI_AUTO_UPDATE: "${GOWA_UI_AUTO_UPDATE:-true}" + WHATSAPP_ACCOUNT_VALIDATION: "false" + WHATSAPP_WEBHOOK: "${GOWA_WEBHOOK_URL:?isi GOWA_WEBHOOK_URL}" + WHATSAPP_WEBHOOK_SECRET: "${GOWA_WEBHOOK_SECRET:?isi GOWA_WEBHOOK_SECRET}" + WHATSAPP_WEBHOOK_EVENTS: "message" + +volumes: + gowa_storages: + gowa_statics: diff --git a/package.json b/package.json index 5e6a6cb..09d0b77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "open-isp", - "version": "0.5.6", + "version": "0.5.7", "description": "OPEN-ISP \u2014 sistem billing & manajemen ISP open-source (PWA pelanggan, multi-OLT, RADIUS, WhatsApp, QRIS)", "main": "app-customer.js", "scripts": { diff --git a/version.txt b/version.txt index ad83b1b..dc2b74e 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.5.6 \ No newline at end of file +0.5.7 \ No newline at end of file