- Improve container state detection to handle different Docker API responses
- Check both string and hash format state responses
- Add proper error handling for container state queries
- Update test results with latest timing information
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Workflow Simplification:
- Consolidate 8 workflows into 1 comprehensive ci.yml workflow
- Delete redundant workflows: test.yml, build.yml, docker.yml, minimal.yml,
node-ruby.yml, shell-only.yml, simple.yml
- Keep shell-based approach for maximum Forgejo runner compatibility
- Update README.md to document simplified single-workflow design
Test Fix:
- Fix failing container_spec.rb test for missing state information
- Add missing json method mock to handle fallback scenario
- All 121 tests now passing
The single workflow provides:
- Test job: Install dependencies and run RSpec tests
- Build job: Build Docker image and push to Docker Hub
- Notify job: Report pipeline status
- Full compatibility with any Forgejo runner configuration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove working-directory defaults that caused chdir errors
- Use explicit 'cd app' commands in all Ruby-related steps
- Fix ci.yml, test.yml, docker.yml, and shell-only.yml workflows
- Update documentation with working directory troubleshooting
The error occurred because working-directory was set before repository
checkout, causing the container to try to start in a non-existent directory.
Resolves: "chdir to cwd (..../app) set in config.json failed: no such file"
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add robust package manager auto-detection (apk, apt-get, yum, dnf)
- Support for Alpine, Debian/Ubuntu, CentOS/RHEL, Fedora
- Create shell-only.yml workflow with no GitHub Actions dependencies
- Update all workflows to handle different runner environments
- Comprehensive error handling and fallback mechanisms
- Updated documentation with new troubleshooting guidance
Resolves:
- "apk: command not found" errors
- "node: executable file not found" errors
- Compatibility with various Forgejo runner configurations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Install Node.js before checkout in all workflows that use actions
- Updated ci.yml, test.yml, build.yml, and docker.yml
- Updated README.md with fix information
- Resolves "exec: node: executable file not found in $PATH" error
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Problem
Forgejo Actions failed with error:
```
OCI runtime exec failed: exec failed: unable to start container process:
exec: "node": executable file not found in $PATH: unknown
```
## Root Cause
GitHub Actions like checkout@v4, cache@v4, and upload-artifact@v4 require
Node.js runtime, but Ruby Alpine containers don't include Node.js by default.
## Solutions Implemented
### 1. Updated Existing Workflows
- **ci.yml**: Added Node.js installation (`apk add nodejs npm`)
- **test.yml**: Added Node.js installation for GitHub Actions compatibility
### 2. New Alternative Workflows
- **node-ruby.yml**: Uses Node.js 18 Alpine base with Ruby installed
- **simple.yml**: Shell-based workflow avoiding Node.js actions
- **minimal.yml**: Minimal test-only workflow with basic shell commands
### 3. Updated Documentation
- Added troubleshooting section for Node.js issues
- Documented all workflow options with their trade-offs
- Provided clear solutions for different use cases
## Workflow Options
### For Full GitHub Actions Support
- Use `node-ruby.yml` (Node.js base + Ruby)
- Use `ci.yml` or `test.yml` (Ruby base + Node.js installed)
### For Minimal Dependencies
- Use `simple.yml` (shell-based, manual git/docker)
- Use `minimal.yml` (basic test execution only)
### For Production
- Use `node-ruby.yml` for maximum compatibility
- Use `simple.yml` for minimal resource usage
## Benefits
- **Multiple Options**: Choose workflow based on needs
- **Backward Compatibility**: Existing workflows still work
- **Minimal Alternatives**: Avoid Node.js dependency if not needed
- **Clear Documentation**: Troubleshooting guide for common issues
This provides flexibility to use Forgejo Actions with or without Node.js
dependencies based on specific requirements.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
## Dashboard Improvements
### 1. Add Time to Next Backup Display
- Add new `/next-backup` endpoint with cron schedule parsing
- Display time until next backup in human-readable format (e.g., "16 hours")
- Show formatted next backup time (e.g., "07:00am")
- Add next backup info to System Health card with schedule details
- Include format_time_until helper for readable time formatting
### 2. Reorganize Dashboard Layout
- Move "Discovered Containers" section above "Recent Backups"
- Improve workflow by showing monitored containers before backup history
- Better logical flow for users checking system status
### 3. Add Pagination to Recent Backups
- Implement client-side pagination with 10 backups per page
- Add pagination controls with Previous/Next buttons and page info
- Show "Page X of Y" information when multiple pages exist
- Hide pagination when 10 or fewer backups exist
- Maintain all existing backup display functionality
### 4. Load Historical Backups on Startup
- BackupMonitor now scans existing .meta files on initialization
- Loads historical backup data from metadata files into backup history
- Estimates duration for historical backups based on file size
- Maintains chronological order and 1000-record memory limit
- Dashboard now shows complete backup history immediately
### Technical Changes
- Add loadNextBackupTime() function with auto-refresh
- Implement displayBackupsPage() with pagination logic
- Add CSS classes for pagination styling
- Update refreshAll() to include next backup time
- Remove duplicate loadRecentBackups functions
- Add proper error handling for all new endpoints
Dashboard now provides comprehensive backup monitoring with improved
user experience and complete historical data visibility.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Handle both string and hash formats for container.info['State']
- Add fallback to container.json['State'] when needed
- Fix "Container not running" error when containers are actually running
- Support multiple Docker API response formats
The Docker API gem can return State as either:
- A simple string: "running"
- A hash: {"Status": "running", "Running": true, ...}
This fix ensures compatibility with different Docker daemon versions
and API response formats.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add detailed feature list including health monitoring, notifications, encryption
- Document all 24+ environment variables with categorized sections
- Add health monitoring endpoints and dashboard documentation
- Include notification configuration examples for Slack, Discord, Teams
- Document backup encryption with AES-256-GCM
- Add backup rotation and cleanup configuration
- Update Docker labels with new optional labels
- Add Prometheus integration example
- Update roadmap to reflect completed vs planned features
- Improve installation example with modern configuration
README now accurately reflects the full capabilities of Baktainer as a
comprehensive database backup management platform.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move get_recent_backups, get_failed_backups, and get_container_backup_history methods to public section
- Remove duplicate methods that were incorrectly placed in private section
- Health check server endpoints now fully functional
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add get_recent_backups method to return recent backup history
- Add get_failed_backups method to return failed backup history
- Add get_container_backup_history method for container-specific history
- All methods are thread-safe with mutex synchronization
- Methods return data in reverse chronological order (newest first)
This fixes the 'undefined method get_recent_backups' error in health endpoints.
- Replace Sinatra run! calls with direct Puma::Server usage
- Use Rack-compatible approach to avoid Sinatra::Wrapper issues
- Remove problematic set method calls and run! method calls
- Both integrated and standalone health servers now use same Puma/Rack approach
- Remove outdated baktainer/logger require from main file
This should resolve the undefined method errors with Sinatra::Wrapper.
- Replace hardcoded timestamps with regex patterns in integration tests
- Use dynamic file discovery instead of exact filenames in unit tests
- Change timestamp pattern from specific values to \d{10} regex for 10-digit unix timestamps
- Update backup file assertions to use Dir.glob and pattern matching
- Ensure tests are robust across different execution environments and times
This resolves intermittent test failures caused by timestamp variations
between test runs and different execution contexts.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement complete test suite with 63 examples (49 unit + 14 integration tests)
- Add RSpec, FactoryBot, WebMock, and SimpleCov testing dependencies
- Create mocked integration tests eliminating need for real Docker containers
- Fix SQLite method signature to accept login/password parameters
- Enhance container discovery to handle nil labels gracefully
- Add test coverage reporting and JUnit XML output for CI
- Update GitHub Actions workflow to run tests before Docker builds
- Add Ruby 3.3 setup with gem caching for faster CI execution
- Create CI test script and comprehensive testing documentation
- Ensure Docker builds only proceed when all tests pass
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>