Commit Graph
91 Commits
Author SHA1 Message Date
Juan DenisandClaude Opus 4.5 4ba0afee97 fix(2): load .env file in CLI before app initialization
CLI commands failed with "unable to open database file" because
environment variables weren't loaded from .env before create_app().

Now checks multiple .env locations:
- Same directory as cli.py
- Parent directory
- /opt/serverkit/.env (production)
- /opt/serverkit/backend/.env

Add --debug flag to show which env file was loaded.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:57:39 -05:00
Juan DenisandClaude Opus 4.5 3f9884c055 fix(2): parse NDJSON output from docker compose ps
docker compose ps --format json outputs NDJSON (one JSON object per
line), not a JSON array. Parse each line separately to correctly
detect running containers.

This fixes container detection in app status and diagnostics.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:56:43 -05:00
github-actions[bot] 5b0e665f12 chore: bump version to 1.2.11 [skip ci] 2026-01-19 06:22:05 +00:00
Juan Denis a4323b1cbc Enhance README with server kit image
Added an image to the README for visual enhancement.
2026-01-19 01:21:58 -05:00
github-actions[bot] 547c991f89 chore: bump version to 1.2.10 [skip ci] 2026-01-19 06:18:20 +00:00
Juan DenisandClaude Opus 4.5 910967f0e8 docs(2): add WordPress template testing plan
Phase 2 plan for testing WordPress template end-to-end:
- Verify template exists and is valid
- Install WordPress via API
- Verify container and database status
- Test Nginx routing and domain access
- Access WordPress installation wizard
- Document results and issues

Uses Phase 1 diagnostic tools for troubleshooting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:15:22 -05:00
Juan DenisandClaude Opus 4.5 721e8a33f6 docs(1-1): complete Docker & Domain Debugging plan
- SUMMARY.md: Document all changes, commits, and testing checklist
- STATE.md: Mark Phase 1 complete, update current phase to 2
- ROADMAP.md: Update Phase 1 status to completed

Phase 1 delivered diagnostic tools for identifying routing issues
between domains, Nginx, and Docker containers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:10:10 -05:00
Juan DenisandClaude Opus 4.5 eeec611fc4 chore(1-1): add routing test script
Shell script to test the full Docker app routing chain:
- Port accessibility check
- Nginx config existence and enablement
- Nginx syntax validation
- Service status check
- Direct backend HTTP request
- Domain routing via Host header
- Docker container status and port bindings

Provides colored output and actionable hints for failures.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:08:59 -05:00
Juan DenisandClaude Opus 4.5 9a072fb4b9 feat(1-1): add routing diagnostics UI to application detail
- Show port accessibility status in overview
- Add RoutingDiagnosticsCard component for Docker apps
- Run full diagnostics with health checks
- Display Nginx config status, Docker status, issues and recommendations
- Show Nginx config content for debugging
- Add corresponding LESS styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:08:12 -05:00
Juan DenisandClaude Opus 4.5 47acb0914c feat(1-1): add port accessibility to app status endpoint
GET /api/v1/apps/{id}/status now returns:
- port: The configured port number
- port_accessible: Boolean indicating if the port is reachable

Helps frontend display real-time routing health status.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:06:37 -05:00
Juan DenisandClaude Opus 4.5 5ac5a85e90 feat(1-1): verify port accessibility after template installation
- Wait for containers to start after docker compose up
- Check if configured port is accessible
- Include port status in installation response
- Log warning if port not accessible (may need more startup time)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:06:11 -05:00
Juan DenisandClaude Opus 4.5 1a2c39065c fix(1-1): validate port configuration on domain creation
- Require Docker apps to have a port configured before adding domains
- Check port accessibility and include warning if port not reachable
- Provides actionable error messages with hints for resolution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:05:33 -05:00
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