- Add first_name and last_name to select clause in setup-admin endpoint
- Add first_name and last_name to select clause in signup endpoint
- Ensures frontend receives the name fields after user creation
- Fixes issue where first/last names don't populate in UI after setup
The data was being saved to database correctly but not returned in the API response, causing frontend to not display the names properly.
- Add detect_package_manager() function that prefers 'apt' over 'apt-get'
- Use PKG_MANAGER variables throughout script for consistency
- Support both modern Debian 13+ (apt) and older systems (apt-get)
- Automatically detect and use the best available package manager
- Better error handling when no package manager is found
Fixes compatibility with:
- Debian 13 (Trixie) and newer
- Ubuntu 22.04+ (prefers apt)
- Older Debian/Ubuntu systems (fallback to apt-get)
All package operations now use the detected package manager:
- System updates and upgrades
- Prerequisites installation
- Node.js, PostgreSQL, nginx, certbot installation
- Add root permission check at startup
- Install sudo automatically if not present (for Debian systems)
- Add run_as_user() helper function with better error handling
- Provide fallback PostgreSQL setup using 'su' when sudo unavailable
- Replace all sudo -u commands with the new helper function
- Better error messages for missing users/sudo
This ensures compatibility with minimal Debian systems that don't have sudo by default.
- Detect when FQDN starts with digit (IP address)
- Generate 2 random letter prefix for database/service names
- Use prefixed names for DB_NAME, DB_USER, INSTANCE_USER
- Keep original FQDN for nginx configs and URLs
- Prevents PostgreSQL errors with numeric database names
Example: 192.168.1.50 -> xy192_168_1_50 for services
Created default user role
modified server.js to check if roles of admin/user is present
modified server.js to check dashboard cards
set up default dashboard cards to show
- Move Docker files to own directory (tidier since I added several more files)
- Optimise images and reduce size
- Uses multi-stage builds
- Optimises layer efficiency
- Uses NGINX as base for frontend
- Sets default env vars
- Uses tini for proper signal handling