Releases: BrOrlandi/CodeHarbor-Executor
v2.1.1
Fix: Docker entrypoint for data directory permissions
Adds a docker-entrypoint.sh that fixes DATA_DIR ownership on container startup, ensuring smooth migration from v0.2.0 without manual permission fixes.
Changes
- Added
docker-entrypoint.sh— runs as root, chownsDATA_DIRtocodeharbor, then drops privileges withgosu - Installed
gosuin Dockerfile - Bumped version to 2.1.1
Migration from v0.2.0
No manual chown needed — the entrypoint handles it automatically on first boot.
v2.1.0 — Simplification & Settings Page
What's New
Unified Data Directory
Replaced three separate directories and Docker volumes (executions/, dependencies-cache/, data/) with a single data/ directory containing all persistent data:
data/
codeharbor.db # SQLite database
cache/ # dependency cache
executions/ # execution workspaces
Docker setup is now a single volume mount:
volumes:
- codeharbor_data:/home/codeharbor/app/dataConsolidated Pruning Config
Removed the redundant MAX_JOB_HISTORY env var. EXECUTIONS_DATA_PRUNE_MAX_COUNT now controls both execution directory pruning and database job record pruning with a single value.
MAX_JOB_HISTORYstill works as a fallback with a deprecation warning.
Settings Page
New read-only Settings page in the dashboard (/dashboard/settings) showing all runtime configuration values grouped by category: Server, Execution, Cache, Dashboard, and System.
Environment Variable Paths
DATA_DIR, EXECUTION_DIR, and CACHE_DIR are now all configurable via environment variables. Docker ENV vars are properly respected.
Automatic Migration
On first startup with v2.1, if old directories (./executions/, ./dependencies-cache/) exist, they are automatically moved into the new data/ structure with log messages.
Dynamic Health Version
The /health endpoint now reads the version from package.json instead of a hardcoded string.
Configuration Changes
| Change | Details |
|---|---|
| Removed | MAX_JOB_HISTORY (deprecated, still works as fallback) |
| Added | DATA_DIR — root for all persistent data (default: ./data) |
| Added | EXECUTION_DIR — execution workspaces (default: ${DATA_DIR}/executions) |
| Added | CACHE_DIR — dependency cache (default: ${DATA_DIR}/cache) |
| Unified | EXECUTIONS_DATA_PRUNE_MAX_COUNT now controls both dir and DB pruning |
Docker Migration
If upgrading from v2.0, update your docker-compose.yml:
volumes:
- - codeharbor_cache:/home/codeharbor/app/cache
- - codeharbor_executions:/home/codeharbor/app/executions
- - codeharbor_data:/home/codeharbor/app/data
+ - codeharbor_data:/home/codeharbor/app/data
environment:
- - MAX_JOB_HISTORY=1000
- EXECUTIONS_DATA_PRUNE_MAX_COUNT=100Full Changelog: v2.0.0...v2.1.0
v2.0.0 — Dashboard, Job History & Test Infrastructure
What's New
Web Dashboard
- Built-in Vue.js 3 dashboard at
/dashboardwith dark theme inspired by the brand color#1c8cf6 - Job History — browse, search, filter, and paginate all executions with status badges, timing, and cache info
- Code Editor — write and execute JavaScript code with CodeMirror syntax highlighting directly from the browser
- Binary Output — preview images, play audio/video, and download files generated by your code
- Cache Analysis — monitor dependency cache usage, sizes, and installed packages per cache key
- Interactive Examples — try ready-to-run examples (QR Code, Meme Generator, PDF, Name Generator, Lodash) with one click
- Documentation — rendered README and API docs (Swagger UI) embedded in the dashboard
- Cron Jobs — placeholder page for upcoming scheduled executions feature (#2)
Job History & Database
- SQLite-backed persistent job history recording every
/executecall jobIdfield added to API responses (non-breaking)- Automatic migration of legacy
exec-*execution folders into the database on startup - Configurable retention via
MAX_JOB_HISTORY(default: 1000) - Interrupted job recovery — jobs left in
running/pendingstatus are marked asinterruptedon server restart
Security Improvements
- Timing-safe comparisons (
crypto.timingSafeEqual) for all secret/token validations - HTTP-only cookie authentication for the dashboard (separate from API Bearer tokens)
secureflag on session cookies in production- Query parameter validation (limit clamping, positive integer enforcement)
- Graceful shutdown with forced timeout to prevent hanging
Testing
- Migrated test framework from Jest to Vitest
- 208 tests across 13 test files with 89% statement coverage
- Unit tests for all new services (DatabaseService, JobService, MigrationService, DashboardAuth, DashboardController)
- E2E tests for authentication, code execution, and health endpoints
Configuration
New environment variables:
| Variable | Default | Description |
|---|---|---|
MAX_JOB_HISTORY |
1000 |
Maximum job records in the database |
DASHBOARD_ENABLED |
true |
Enable/disable the web dashboard |
Other Changes
- Version bumped to
2.0.0 - Updated README with dashboard screenshot, new configuration docs, and v2.0 features
- Advanced examples extracted to
docs/advanced-examples.md - Swagger UI available at
/api/docs - Added
data/volume for persistent database storage in Docker - Dashboard build step added to Dockerfile
Breaking Changes
None. The /execute API is fully backward compatible. The jobId field in the response is additive.
How to Upgrade
Docker
docker pull brorlandi/codeharbor-executor:2.0.0Docker Compose
Update your docker-compose.yml to add the data volume:
volumes:
- codeharbor_data:/home/codeharbor/app/data
environment:
- MAX_JOB_HISTORY=1000
- DASHBOARD_ENABLED=trueManual
git pull
pnpm install
cd dashboard && pnpm install && pnpm build && cd ..
pnpm startAccess the dashboard at http://localhost:3000/dashboard
Full Changelog: v0.2.0...v2.0.0