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
+9
-10
@@ -26,23 +26,22 @@ npm run dev
|
||||
# or: python manage.py runserver 0.0.0.0:8000
|
||||
```
|
||||
|
||||
Seed creates user `admin` / `admin123`, then seeds the default Sukawarna demo data — **Kandang 4** and **Kandang 5** closed cycles (49 days each, 22 May – 9 Jul 2026) with full daily records and IoT panels. A manager login `skw_manager` / `skw_manager123` is created too. It also prints a one-time API key.
|
||||
Seed creates user `admin` / `admin123`, then seeds the default Sukawarna demo data — **Kandang 1** and **Kandang 2** closed cycles (49 days each, 22 May – 9 Jul 2026) with full daily records and IoT panels. A manager login `skw_manager` / `skw_manager123` is created too. It also prints a one-time API key.
|
||||
|
||||
## Docker Compose
|
||||
|
||||
```bash
|
||||
cp dashboard-new-v2/backend/.env.example dashboard-new-v2/backend/.env
|
||||
# edit KARUNG_WEB_ADMIN_BASE_URL as needed
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Production Postgres:
|
||||
From the project root (`dashboard-new-v2/`):
|
||||
|
||||
```bash
|
||||
# set DB_ENGINE=django.db.backends.postgresql and DB_* in dashboard-new-v2/backend/.env
|
||||
docker compose --profile prod up --build
|
||||
cp docker/.env.example .env
|
||||
docker compose up -d --build
|
||||
docker compose exec api python manage.py bootstrap_admin
|
||||
```
|
||||
|
||||
Production bootstrap creates superadmin only (no demo cycles). Dev demo: `python manage.py seed_demo`.
|
||||
|
||||
See [../DOCKER.md](../DOCKER.md) for ports, cron, and troubleshooting.
|
||||
|
||||
## Auth
|
||||
|
||||
- **Session:** `POST /api/v1/auth/login/` then send session cookie + `X-CSRFToken` on writes
|
||||
|
||||
Reference in new issue
Block a user