update docker deployment and changing seed kandang name
This commit is contained in:
1 parent
76f4d0106a
commit
74dd3faf60
40 files changed
+1253
-122
No files matched your search
@@ -46,7 +46,7 @@ Seed logins:
|
||||
- `admin` / `admin123` — superadmin (can create/manage sites and kandang)
|
||||
- `staff` / `staff123` — active staff (owns the seeded site; can read sites/kandang and create cycles, but cannot create/edit/delete sites or kandang)
|
||||
|
||||
`seed_demo` creates both logins plus an API key, then seeds the default Sukawarna demo data: **Kandang 4** (45,000 DOC) and **Kandang 5** (50,000 DOC), both 49-day closed cycles (22 May – 9 Jul 2026) with full daily data (chicken counting, chicken weight, feed sacks, manual input, KPI) and **10-minute IoT panel readings** (144 readings per day per flock). Feed-sack `out` (keluar) data only occurs in the final week of the cycle (~20 sacks total), separate from usage (`feed_use`).
|
||||
`seed_demo` creates both logins plus an API key, then seeds the default Sukawarna demo data: **Kandang 1** (45,000 DOC) and **Kandang 2** (50,000 DOC), both 49-day closed cycles (22 May – 9 Jul 2026) with full daily data (chicken counting, chicken weight, feed sacks, manual input, KPI) and **10-minute IoT panel readings** (144 readings per day per flock). Feed-sack `out` (keluar) data only occurs in the final week of the cycle (~20 sacks total), separate from usage (`feed_use`).
|
||||
|
||||
**Frontend** (terminal 2):
|
||||
|
||||
@@ -77,6 +77,28 @@ npm run dev
|
||||
|
||||
Open [http://localhost:3001](http://localhost:3001). Vite proxies `/api` to Django on `:8000`.
|
||||
|
||||
## Docker deployment
|
||||
|
||||
Full-stack deployment (Postgres + Django API + cron + Nginx frontend), modeled on the legacy `dashboard/` Docker setup:
|
||||
|
||||
```bash
|
||||
cd dashboard-new-v2
|
||||
cp docker/.env.example .env
|
||||
# edit SECRET_KEY and DB_PASSWORD
|
||||
docker compose up -d --build
|
||||
docker compose exec api python manage.py bootstrap_admin
|
||||
```
|
||||
|
||||
- UI: [http://localhost:5002](http://localhost:5002) — login `admin` / password from `BOOTSTRAP_ADMIN_PASSWORD` in `.env`
|
||||
- API (direct): [http://localhost:18000/api/v1/health/](http://localhost:18000/api/v1/health/)
|
||||
- Postgres (host): `localhost:15432`
|
||||
|
||||
For **dev demo data** only: `docker compose exec api python manage.py seed_demo` (not for production).
|
||||
|
||||
See [DOCKER.md](./DOCKER.md) for architecture, env vars, cron, and troubleshooting.
|
||||
|
||||
**Daily publish rule:** dashboard data for calendar day D is only visible from **17:00 WIB** on day D — **except IoT Panel**, which syncs every 10 minutes and shows live readings.
|
||||
|
||||
## Screens
|
||||
|
||||
Login, Dashboard (KPI + AI insight + Total Pakan section + in-memory Harian/Akhir Siklus report), Hitung Ayam, Berat Ayam, Standar Ross, Hitung Karung (Sync hari ini + Saldo Awal + daily in/use/out tables), Standar Performa, Panel IoT (per-day 10-minute readings with charts), FCR, EEF, Pengaturan.
|
||||
|
||||
Reference in new issue
Block a user