You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.4 KiB
2.4 KiB
Environment Variables
Terakhir Diperbarui: 2026-06-29 ⚠️ Jangan commit nilai secret ke repository.
FastAPI Collector (.env di server)
File: /opt/stacks/geonetagent-collector/.env (atau path deploy di 10.100.1.24)
| Variable | Contoh | Keterangan |
|---|---|---|
DATABASE_URL |
postgresql://user:pass@10.100.1.25:5432/geonetagent |
SECRET — lihat /root/geonetagent_dev.credentials di server 10.100.1.25 |
COLLECTOR_SECRET_KEY |
(string random) | SECRET — untuk signing internal |
AGENT_BEARER_TOKEN |
dev-agent-token-change-me |
SECRET — token yang dikirim agent di header Authorization |
AGENT_TOKEN_CHECK_DB |
false |
true = validasi token ke DB, false = token statis |
API_BEARER_TOKEN |
(kosong = sama dengan AGENT) | Token untuk read API eksternal (FE) |
CORS_ORIGINS |
* atau https://my.gisportal.id |
CORS allowed origins |
AGENT_TOKEN_SALT |
(string random) | Salt untuk hash token DB |
APP_TIMEZONE |
Asia/Jakarta |
Timezone aplikasi |
Laravel Portal (Planned)
File: .env di stack Laravel (belum scaffold)
| Variable | Keterangan |
|---|---|
APP_KEY |
Laravel encryption key |
DB_HOST |
10.100.1.25 |
DB_DATABASE |
geonetagent |
DB_USERNAME |
SECRET |
DB_PASSWORD |
SECRET — lihat /root/geonetagent_dev.credentials |
ZABBIX_API_URL |
URL Zabbix API (fase 2) |
ZABBIX_API_TOKEN |
SECRET (fase 2) |
ZABBIX_WEBHOOK_SECRET |
SECRET (fase 2) |
PowerShell Agent (config.json di endpoint)
File: %ProgramData%\GeoNetAgent\config.json
| Key | Keterangan |
|---|---|
CollectorUrl |
https://agent.gisportal.id/api/v1/agent/report |
AgentToken |
SECRET — site agent token (bukan kredensial admin) |
ReportIntervalHours |
Interval laporan (default: 3 jam) |
Template: agent/config.example.json
Template File
Gunakan .env.example di root sebagai template. Format variabel sudah sesuai — hanya isi nilai yang kosong atau bertanda CHANGE_ME.
Lokasi Secret
| Secret | Lokasi |
|---|---|
| DB credentials | /root/geonetagent_dev.credentials di 10.100.1.25 |
| Agent bearer token | .env di server deploy collector |
| QNAP Object Storage key | infra/qnap/README.md (referensi) |
| SSH private keys | ~/.ssh/ di laptop developer |