3.0 KiB
3.0 KiB
SIDES Deploy — STATE.md
Deployment Status
- App: Running on Proxmox LXC (Docker Compose)
- URL: http://localhost:8080 (or server IP:8080)
- Timezone: Asia/Kuala_Lumpur (UTC+8) on all containers
User Accounts
| Username | Password | Access Level | Notes |
|---|---|---|---|
| admin | sides2026 | 1 (Admin) | Full access |
| jpskedah | kedah2026 | 1 (Admin) | Full access (upgraded from level 2) |
| ijantck | sides2026 | 1 (Admin) | Full access |
| imam14 | sides2026 | 1 (Admin) | Full access |
Bugs Fixed
Critical
- RainfallController SQL binding: Off-by-one (11 params vs 10
?placeholders) + Carbon object passed as string binding. Fixed to use formatted strings. - WaterLevelController displayDate: Carbon object passed instead of string. Fixed.
- Storage permissions:
storage/andbootstrap/cache/chowned to UID 1000 (www). Log file truncated. - PHP-FPM 502 Bad Gateway: Nginx cached stale DNS for
appcontainer. Fixed by restarting nginx. - Asset URL generation: Added
ForceRequestSchememiddleware +TrustProxies(at: '*')soasset()uses the client's actual host instead of hardcodedlocalhost:8080. - Nginx X-Forwarded headers: Added to fastcgi params for proper proxy support.
- JS null guards:
script.js— guard#mapand flatpickr elements.graph.js— guard#hourlyGraph.homemap.js— no guard needed (public homepage always has#map). - graph.js comma typo:
input:not([readonly]),,→input:not([readonly]),
Browser Cache Issues
- Added
?h=<md5>cache-busting suffixes to JS/CSS URLs - Added
Cache-Control: no-cache, no-store, must-revalidateheaders via nginx for.js/.css - Added
Cache-Control: no-cache, no-store, must-revalidatevia ForceRequestScheme middleware for HTML - Added
<meta http-equiv="Cache-Control/Pragma/Expires">no-cache tags in header blade
Configuration
- Timezone:
TZ=Asia/Kuala_Lumpurin.env, applied to all containers viadocker-compose.yml - APP_TIMEZONE:
Asia/Kuala_Lumpurinsrc/.env, used byconfig/app.php
Data
- PostgreSQL 18: Data dir path fixed to
/var/lib/postgresql/data, PGDATA set, non-empty password - Backup data restored from
backup/sides_20260528(users, stations, rainfall, waterlevel, notification) users.emailmade nullable (admin, jpskedah have NULL emails)- DB sequences reset to 300K+ to avoid duplicate key errors
- PostgreSQL RULEs for
ON CONFLICT DO NOTHINGon sensor tables - Admin password reset to
sides2026(hash compatible with Laravel)
Quick Tasks Completed
| Date | Slug | Description | Status |
|---|---|---|---|
| 2026-05-29 | browser-cache-fix | Added cache-busting hashes, no-cache headers, HTML meta tags | Complete |
| 2026-05-29 | login-passwords | Set known passwords for all 4 users, upgraded jpskedah to admin | Complete |
| 2026-05-29 | timezone-config | Added TZ=Asia/Kuala_Lumpur to all containers via docker-compose | Complete |