Commit Graph
79 Commits
Author SHA1 Message Date
Juan DenisandClaude Opus 4.5 cb809ee4dd feat(1-1): add routing diagnostic API endpoints
New endpoints for debugging domain/container routing:
- GET /api/v1/domains/debug/diagnose/{app_id}: Full diagnostic report
  with app config, domains, nginx status, docker containers, health
  assessment and actionable recommendations
- POST /api/v1/domains/debug/test-routing/{app_id}: Active routing
  tests to verify traffic flow

Both endpoints require admin access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:05:05 -05:00
Juan DenisandClaude Opus 4.5 f14af7107e feat(1-1): add Nginx config diagnostics and routing checks
Add diagnostic methods to NginxService:
- get_site_config(): Get config content, enabled status, parsed info
- diagnose_site(): Full diagnostic with health check and recommendations
- check_site_routing(): Test the complete routing chain

Includes automatic health assessment and actionable recommendations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:04:29 -05:00
Juan DenisandClaude Opus 4.5 5182d2326c feat(1-1): add port accessibility and container network diagnostics
Add diagnostic methods to DockerService:
- check_port_accessible(): Test if a port has something listening
- get_container_port_bindings(): Get port mappings for a container
- get_container_network_info(): Get full network settings including IPs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:03:51 -05:00
Juan DenisandClaude Opus 4.5 ba4f4213c9 Add Phase 1 execution plan for Docker & Domain debugging
- Detailed 8-task plan to fix port mapping and domain routing
- Adds diagnostic methods to DockerService and NginxService
- New debug endpoint for full routing diagnosis
- Frontend diagnostic UI for ApplicationDetail page
- Test script for manual verification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:02:31 -05:00
Juan DenisandClaude Opus 4.5 0e78b56a3a Add comprehensive enhancement roadmap and project plan
- PROJECT.md: Define enhancement goals and success criteria
- ROADMAP.md: 10-phase plan covering Docker debugging, template
  testing, private URLs, and UI polish
- STATE.md: Track progress across all phases
- Replace strategic roadmap with actionable implementation plan

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 00:59:46 -05:00
github-actions[bot] d4148bef4e chore: bump version to 1.2.9 [skip ci] 2026-01-19 05:38:29 +00:00
Juan Denis 6ea84d1482 Improve file service error handling and add root dir
Added '/var/serverkit' to ALLOWED_ROOTS for file browsing. Enhanced error handling for owner/group resolution to support missing pwd/grp modules and additional exception types. Improved get_disk_usage to check for path existence, handle permission errors, and avoid division by zero.
2026-01-19 00:38:20 -05:00
github-actions[bot] 6a72c2cd69 chore: bump version to 1.2.8 [skip ci] 2026-01-19 05:34:48 +00:00
Juan Denis 122f099167 Fix log display for array and string formats
Updated log fetching logic in LogsTab to handle both array and string formats for Docker and regular app logs, ensuring logs are displayed correctly regardless of backend response structure.
2026-01-19 00:34:39 -05:00
github-actions[bot] fec7639ca8 chore: bump version to 1.2.7 [skip ci] 2026-01-19 05:31:27 +00:00
Juan Denis 696856e42c Fix Docker apps loading in DockerDatabasesTab
Replaces a generic API call with api.getApps() and corrects the property access for apps data, ensuring only Docker apps are filtered and set. This resolves issues with loading and displaying Docker apps in the DockerDatabasesTab component.
2026-01-19 00:31:19 -05:00
github-actions[bot] 797fd46e82 chore: bump version to 1.2.6 [skip ci] 2026-01-19 05:26:26 +00:00
Juan Denis 52a6b2aa6b Refactor version fetch to use getVersion API method
Replaces direct API call in AboutSection with the new getVersion method from ApiService for improved code organization and reusability.
2026-01-19 00:26:17 -05:00
github-actions[bot] c084535460 chore: bump version to 1.2.5 [skip ci] 2026-01-19 05:17:23 +00:00
Juan Denis 987fb8e807 Add Docker database and logs support to frontend
Introduces UI and API integration for managing and querying databases running inside Docker containers, including a new 'Docker Apps' tab in the Databases page. Enhances the QueryRunner to support Docker databases and updates the ApplicationDetail logs tab to handle Docker app logs with auto-refresh. Adds corresponding API methods for Docker database and log operations.
2026-01-19 00:17:15 -05:00
github-actions[bot] 1baae0e460 chore: bump version to 1.2.4 [skip ci] 2026-01-19 05:11:57 +00:00
Juan Denis b619779059 Add dynamic ServerKit version endpoint and UI
Introduces a new /system/version API endpoint in the backend to provide the current ServerKit version, reading from possible VERSION files. Updates the frontend About section to fetch and display the version dynamically instead of hardcoding it.
2026-01-19 00:11:49 -05:00
github-actions[bot] 98cb60c970 chore: bump version to 1.2.3 [skip ci] 2026-01-19 05:01:41 +00:00
Juan Denis c7eaafab6a Enhance app deletion and improve port allocation logic
App deletion now performs Docker cleanup, removes app folders, and cleans up Nginx configs, returning detailed cleanup results. TemplateService port variable generation now avoids ports in use by Docker containers and system processes, improving reliability for dynamic port assignment.
2026-01-19 00:01:33 -05:00
github-actions[bot] afcf55bcd2 chore: bump version to 1.2.2 [skip ci] 2026-01-19 04:55:21 +00:00
Juan Denis bf237c698d Add Docker database and app management endpoints
Implements endpoints for managing and querying MySQL/PostgreSQL databases running in Docker containers, including listing containers, databases, tables, and executing queries. Adds endpoints for retrieving app logs and real-time status for Docker apps. Updates template variable processing to flag auto-generated and hidden variables. Extends DatabaseService with Docker MySQL/PostgreSQL discovery and query utilities.
2026-01-18 23:55:12 -05:00
github-actions[bot] 96bd4404fe chore: bump version to 1.2.1 [skip ci] 2026-01-19 04:51:12 +00:00
Juan Denis 8d9f7f383f Add Docker app nginx config automation and port detection
Automatically create, update, and delete nginx configs for Docker applications when domains are added or removed. Adds an endpoint to manually regenerate nginx configs for Docker apps. Updates TemplateService to detect port from multiple possible variable names (PORT, HTTP_PORT, WEB_PORT) when creating Docker app records.
2026-01-18 23:51:04 -05:00
github-actions[bot] 2c244255a2 chore: bump version to 1.2.0 [skip ci] 2026-01-19 04:38:21 +00:00
Juan DenisandClaude Opus 4.5 2c4976e4f5 feat: Add Docker cleanup to install/update and --force flag
- Add docker network prune and docker system prune before builds
- Use --no-cache for docker compose build to ensure fresh builds
- Add --force / -f flag to skip version check during update
- Helps prevent Docker networking issues

Usage: sudo serverkit update --force

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:38:13 -05:00
github-actions[bot] fb8915a891 chore: bump version to 1.1.6 [skip ci] 2026-01-19 04:27:52 +00:00
Juan DenisandClaude Opus 4.5 2701a49140 fix: Correct db import in template_service
Import db from 'app' not 'app.models'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:27:45 -05:00
github-actions[bot] d34495deec chore: bump version to 1.1.5 [skip ci] 2026-01-19 04:24:30 +00:00
Juan DenisandClaude Opus 4.5 bac265d80a fix: Add error tracing to template install endpoint
Added try-except with traceback logging to help debug 500 errors
during template installation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:24:22 -05:00
github-actions[bot] fa69285bcc chore: bump version to 1.1.4 [skip ci] 2026-01-19 04:19:27 +00:00
Juan DenisandClaude Opus 4.5 e36017bed6 fix: validate-install endpoint handles list-format variables
Same bug as before - the validate_installation function was using
.items() on variables expecting a dict, but templates now use
list format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:19:20 -05:00
github-actions[bot] ba99b69115 chore: bump version to 1.1.3 [skip ci] 2026-01-19 04:14:16 +00:00
Juan DenisandClaude Opus 4.5 d5409d74a9 Remove PHP management page from UI
PHP apps should now be deployed via Docker using the php-app template.
This removes the host PHP management UI in favor of containerized deployments.

Removed:
- PHP.jsx page component
- PHP navigation link from sidebar
- PHP route from App.jsx
- PHP styles (_php.less)

The php-app template remains available for deploying PHP apps in Docker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:14:08 -05:00
github-actions[bot] 01b1d3f4c4 chore: bump version to 1.1.2 [skip ci] 2026-01-19 04:07:19 +00:00
Juan DenisandClaude Opus 4.5 49d6ef27d4 fix: Version comparison not exiting early due to set -e
The compare_versions function returns non-zero values to indicate
version differences, but 'set -e' was causing bash to exit.
Now temporarily disabling exit-on-error during version comparison.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:07:11 -05:00
github-actions[bot] 823654d60d chore: bump version to 1.1.1 [skip ci] 2026-01-19 04:04:40 +00:00
Juan DenisandClaude Opus 4.5 22d5074834 fix: Template validation now handles list-format variables
The validate_template function was failing because it expected
variables in dict format but templates now use list format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:04:31 -05:00
github-actions[bot] 5d0cc7b92e chore: bump version to 1.1.0 [skip ci] 2026-01-19 04:00:25 +00:00
Juan DenisandClaude Opus 4.5 8bccfcdcf8 feat: Add automatic versioning system
- Add VERSION file (starting at 1.0.0)
- Add GitHub Actions workflow to auto-bump version on push
  - patch: default for all commits
  - minor: commits starting with "feat:" or "feature:"
  - major: commits starting with "BREAKING:" or "major:"
- Add CLI commands: version, check-update
- Update 'serverkit update' to show semantic versions
- Compare local vs remote version before updating

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:00:10 -05:00
Juan DenisandClaude Opus 4.5 65ee8ea4cd Fix more templates: ghost, gitea, nextcloud, nginx-proxy-manager
- Convert variables to list format
- Use ${APP_NAME} for container names
- Standardize service names and port variables

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:55:21 -05:00
Juan DenisandClaude Opus 4.5 e673be785d Fix template installation and variable handling
- Add APP_NAME as automatic variable for all template installs
- Handle both list and dict formats for template variables
- Update uptime-kuma, portainer, node-app templates with proper format
- Use ${APP_NAME} for container names instead of hardcoded values
- Standardize port variable names to HTTP_PORT

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:53:36 -05:00
Juan DenisandClaude Opus 4.5 b43bae9a49 Fix: Copy app templates to /etc/serverkit/templates during install
- Install script now copies bundled YAML templates to system directory
- Update command syncs templates on each update
- Creates /var/serverkit/apps directory for installed apps

Fixes 'No templates found' in Templates page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:41:10 -05:00
Juan DenisandClaude Opus 4.5 9ec1a25f33 Fix: Support Docker container logs for apps
- get_app_logs now checks for docker-compose.yml first
- Uses 'docker compose logs' for containerized apps
- Falls back to nginx logs for host-based apps
- Added /var/serverkit and /var/www to allowed log directories

Fixes 'Failed to load logs' error for Docker-deployed apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:39:03 -05:00
Juan DenisandClaude Opus 4.5 736deb0832 Fix: Prevent getcwd errors by ensuring valid working directory
- install.sh now starts with cd /tmp to ensure valid directory
- uninstall command moves to /tmp before deleting install dir
- Shows reinstall command after uninstall

Prevents 'cannot access parent directories' errors when running
install from a deleted directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:33:40 -05:00
Juan DenisandClaude Opus 4.5 2c8f8f4b64 Fix: Restore executable permissions after git update
The update command now restores chmod +x on serverkit and scripts
after git reset --hard to prevent permission denied errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:26:45 -05:00
Juan DenisandClaude Opus 4.5 cab18a32b7 Consolidate templates into backend/templates marketplace
- Removed duplicate root templates/ folder
- Added PHP, Python, Node.js templates to marketplace (YAML format)
- Templates now installable via web UI Templates page
- CLI create-app now points users to web UI
- All 63 templates in one place: backend/templates/

New templates:
- php-app: Custom PHP 8.0-8.3 with Apache
- python-app: Custom Python 3.9-3.12 (Flask/FastAPI/Django)
- node-app: Custom Node.js 18-21 (Express/Next.js)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:23:50 -05:00
Juan DenisandClaude Opus 4.5 e65c680ba2 Add Docker-based app templates for PHP, Python, and Node.js
No need to install PHP/Python/Node on the host - each app runs
in its own isolated Docker container with the exact version needed.

Templates:
- PHP: nginx + php-fpm (8.0, 8.1, 8.2, 8.3)
- Python: Flask/FastAPI/Django (3.9-3.12)
- Node.js: Express/Next.js (18, 20, 21)

New CLI commands:
- create-app <type> <name> [port] - Create new app from template
- list-apps - List all deployed apps
- start-app <name> - Start an app
- stop-app <name> - Stop an app
- app-logs <name> - View app logs

Usage:
  sudo serverkit create-app php myblog
  sudo serverkit create-app python myapi 8200
  sudo serverkit add-site myblog.domain.com 8100

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:17:46 -05:00
Juan DenisandClaude Opus 4.5 eebb37fd5b Add multi-site support with host nginx reverse proxy
- Host nginx routes domains to different apps
- ServerKit frontend moved to port 8080 (internal)
- New CLI commands: setup-proxy, add-site, list-sites, remove-site
- Site config templates for easy domain setup
- Install script now sets up nginx proxy automatically

Usage:
  sudo serverkit add-site test.example.com 3000
  sudo serverkit list-sites
  sudo serverkit remove-site test.example.com

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:04:26 -05:00
Juan DenisandClaude Opus 4.5 958c15b012 Add production server specs to dev docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:56:36 -05:00
Juan DenisandClaude Opus 4.5 1c0dbe923c Add local development setup for Windows/WSL
- docker-compose.dev.yml for quick Docker-based testing
- dev.bat Windows helper script
- dev-setup.sh WSL/Linux setup script
- docs/LOCAL_DEVELOPMENT.md comprehensive guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:54:34 -05:00