Fix login redirect behavior
This commit is contained in:
36
README.md
36
README.md
@ -33,17 +33,53 @@ Target deploy:
|
||||
- reverse proxy `nginx`
|
||||
|
||||
Contoh langkah di server:
|
||||
|
||||
1. Buat user deploy khusus:
|
||||
```bash
|
||||
sudo adduser deploywa
|
||||
sudo usermod -aG sudo deploywa
|
||||
sudo mkdir -p /var/www
|
||||
sudo chown -R deploywa:deploywa /var/www
|
||||
su - deploywa
|
||||
```
|
||||
|
||||
2. Clone project:
|
||||
```bash
|
||||
cd /var/www
|
||||
git clone https://git.iptek.co/wirabasalamah/webhook-test.git wa-test-nextjs
|
||||
cd wa-test-nextjs
|
||||
```
|
||||
|
||||
3. Siapkan environment:
|
||||
```bash
|
||||
cp .env.example .env
|
||||
```
|
||||
|
||||
4. Install dependency dan build:
|
||||
```bash
|
||||
npm ci
|
||||
npm run build
|
||||
```
|
||||
|
||||
5. Jalankan dengan PM2:
|
||||
```bash
|
||||
npx pm2 start ecosystem.config.cjs
|
||||
npx pm2 save
|
||||
```
|
||||
|
||||
6. Pasang config nginx:
|
||||
```bash
|
||||
sudo cp deploy/nginx/wa.iptek.co.conf /etc/nginx/sites-available/wa.iptek.co.conf
|
||||
sudo ln -s /etc/nginx/sites-available/wa.iptek.co.conf /etc/nginx/sites-enabled/wa.iptek.co.conf
|
||||
sudo nginx -t
|
||||
sudo systemctl reload nginx
|
||||
```
|
||||
|
||||
7. Jika pakai HTTPS:
|
||||
```bash
|
||||
sudo certbot --nginx -d wa.iptek.co
|
||||
```
|
||||
|
||||
Set `.env` minimal:
|
||||
```bash
|
||||
NEXT_PUBLIC_APP_URL=https://wa.iptek.co
|
||||
|
||||
Reference in New Issue
Block a user