[v1.2.0] - 2025-06-04
π New Features
- Auto Port Assignment: Databases now auto-assign ports by default (
--port 0)
- Public Access Control: Added
--public flag for external database access
- Security by Default: Databases are now private (localhost only) by default
- Access Level Display: List and info commands now show Public/Private access status
β
Added
- MySQL Public Access: Added
--public flag support for MySQL databases
- Smart Port Management: Automatic port conflict resolution with fallback allocation
- Template Public Override: Template installation now supports
--public flag override
- Enhanced Database Info: Show access level (Public/Private) in database information
- Connection Examples: Dynamic connection strings based on access level (localhost vs external IP)
π Security Improvements
- Private by Default: All databases bind to
127.0.0.1 (localhost) unless explicitly made public
- Explicit Public Access: Requires
--public flag for external accessibility
- Port Isolation: Auto-assigned ports reduce conflicts and accidental exposure
- Security Documentation: Added comprehensive security best practices section
π οΈ Enhanced
- CLI Flags: Updated port flags with clear help text (
--port 0 for auto)
- Output Messages: Enhanced creation success messages with access level information
- Command Help: Improved flag descriptions for better user experience
- Template Defaults: Templates now default to auto port assignment for better flexibility
π Documentation
- README Overhaul: Comprehensive updates showcasing new security and port features
- Security Guide: New section with best practices and connection examples
- Command Reference: Updated with new flags and options
- Examples: Enhanced workflows demonstrating auto ports and access control
π§ Technical Changes
- Docker Integration: Modified container port binding based on public/private setting
- Database Config: Extended
MySQLConfig with Public field to match PostgreSQL
- Container Config: Added
Public field to ContainerConfig struct
- Manager Logic: Enhanced database creation with proper access control handling
- Template System: Updated template installation to support access control overrides
π‘ Usage Examples
# Private database (default, localhost only)
spindb create postgres --name mydb --password secret123
# Public database (externally accessible)
spindb create postgres --name api-db --password secret123 --public
# Auto port assignment (default)
spindb create mysql --name shop --password secret123
# Template with public override
spindb template install postgres-dev my-app --public
Breaking Changes
- Default Ports: CLI flags now default to
0 (auto) instead of specific ports
- Network Binding: Databases now bind to localhost by default (was previously all interfaces)
- Template Behavior: Templates now use auto port assignment unless explicitly specified
β οΈ Migration Note: Existing databases created before v1.2.0 may still bind to all interfaces. Recreate databases if localhost-only access is required.