From b509b03b1880c2411b702675293853732aa79604 Mon Sep 17 00:00:00 2001 From: Wira Irawan Date: Mon, 11 May 2026 12:46:47 +0700 Subject: [PATCH] Clarify env loading in deploy guide --- deploy/debian12/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/deploy/debian12/README.md b/deploy/debian12/README.md index 1f3b497..9f2c42a 100644 --- a/deploy/debian12/README.md +++ b/deploy/debian12/README.md @@ -155,6 +155,17 @@ Gunakan hasil berbeda untuk: - `WEBHOOK_VERIFY_TOKEN` - `WEBHOOK_SHARED_SECRET` +Sebelum menjalankan command Prisma atau backend secara manual, export env ke shell aktif: + +```bash +cd /srv/bizone-web +set -a +source .env +set +a +``` + +Tanpa langkah ini, command seperti `npm run db:migrate:deploy` bisa gagal dengan error `Environment variable not found: DATABASE_URL`. + ## 6. Jalankan PostgreSQL dan Redis ```bash @@ -296,7 +307,10 @@ Setelah ada perubahan code: cd /srv/bizone-web git pull npm install -cd backend && npm install && npm run build && npm run db:generate && npm run db:migrate:deploy +set -a +source .env +set +a +cd backend && npm install && npm run db:generate && npm run build && npm run db:migrate:deploy cd ../frontend && npm install && npm run build sudo systemctl restart bizone-backend bizone-frontend ```