Prepare server deployment

This commit is contained in:
2026-05-12 16:21:00 +07:00
parent ac2cfca335
commit 713bfbcbb9
9 changed files with 120 additions and 16 deletions

View File

@ -25,3 +25,35 @@ cp .env.example .env
npm install
npm run dev
```
## Deploy test server
Target deploy:
- domain `wa.iptek.co`
- app port `127.0.0.1:3007`
- reverse proxy `nginx`
Contoh langkah di server:
```bash
cd /var/www
git clone https://git.iptek.co/wirabasalamah/webhook-test.git wa-test-nextjs
cd wa-test-nextjs
cp .env.example .env
npm ci
npm run build
npx pm2 start ecosystem.config.cjs
npx pm2 save
```
Set `.env` minimal:
```bash
NEXT_PUBLIC_APP_URL=https://wa.iptek.co
WHATSAPP_VERIFY_TOKEN=...
WHATSAPP_ACCESS_TOKEN=...
WHATSAPP_PHONE_NUMBER_ID=...
WA_TEST_NUMBER=...
WA_TEST_LOGIN_USERNAME=...
WA_TEST_LOGIN_PASSWORD=...
SESSION_SECRET=...
```
Contoh config nginx ada di `deploy/nginx/wa.iptek.co.conf`.