Clarify env loading in deploy guide
This commit is contained in:
@ -155,6 +155,17 @@ Gunakan hasil berbeda untuk:
|
|||||||
- `WEBHOOK_VERIFY_TOKEN`
|
- `WEBHOOK_VERIFY_TOKEN`
|
||||||
- `WEBHOOK_SHARED_SECRET`
|
- `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
|
## 6. Jalankan PostgreSQL dan Redis
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@ -296,7 +307,10 @@ Setelah ada perubahan code:
|
|||||||
cd /srv/bizone-web
|
cd /srv/bizone-web
|
||||||
git pull
|
git pull
|
||||||
npm install
|
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
|
cd ../frontend && npm install && npm run build
|
||||||
sudo systemctl restart bizone-backend bizone-frontend
|
sudo systemctl restart bizone-backend bizone-frontend
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user