Prepare server deployment
This commit is contained in:
32
README.md
32
README.md
@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user