Commit Graph

9 Commits

Author SHA1 Message Date
Muhammad Ibrahim
fe5fb92e48 fix: Add git safe.directory configuration for update commands
- Add 'git config --global --add safe.directory' before git pull in update_instance
- Add same fix to small management script update command
- Resolves 'dubious ownership' error when updating repositories
  that were cloned as root but accessed by different users

This fixes the git ownership security warning that prevents
git pull from working during updates.
2025-09-17 23:41:54 +01:00
Muhammad Ibrahim
c8d54facb9 fix: Use .env file for database credentials in update commands
- Update update_instance function to read database credentials from .env file
- Fix database backup to use credentials from .env instead of hardcoded values
- Update migration commands to load environment variables from .env
- Fix small management script update command to use .env credentials

This resolves the 'password authentication failed' error when running
update commands on existing instances where database credentials
are stored in the .env file rather than hardcoded.
2025-09-17 23:39:00 +01:00
Muhammad Ibrahim
f97b300158 fix: Add database migrations to update command
- Add 'npx prisma migrate deploy' to the update command in manage.sh
- Ensures database schema is updated when running update command
- Fixes issue where new features (like version checking) wouldn't work
  after updating without running migrations

The update_instance function already had migrations, but the
manage.sh update command was missing this crucial step.
2025-09-17 22:21:35 +01:00
Muhammad Ibrahim
17ffa48158 fix: Fix SSH command escaping for version checking
- Fix sed command escaping in git ls-remote command
- Add explicit SSH key path and GIT_SSH_COMMAND environment
- Add debug logging for troubleshooting SSH issues
- Ensure proper SSH authentication for private repositories

This resolves the 'Failed to fetch repository information' error
when checking for updates from private GitHub repositories.
2025-09-17 22:19:12 +01:00
Muhammad Ibrahim
16821d6b5e feat: Implement SSH-based version checking for private repositories
- Replace HTTPS GitHub API calls with SSH git commands
- Use existing deploy key for private repository access
- Add proper error handling for SSH authentication issues
- Support fetching latest tags via git ls-remote
- Maintain compatibility with private repositories using deploy keys

This allows the version checking system to work with private repositories
that have SSH deploy keys configured, using the same authentication
as the local git operations.
2025-09-17 22:16:52 +01:00
Muhammad Ibrahim
babf58bb98 chore: Remove manage-patchmon.sh from repository and add to gitignore
- Remove manage-patchmon.sh from Git tracking
- Add manage-patchmon.sh to .gitignore to prevent future commits
- File was accidentally committed in previous version management update
v1.2.3
2025-09-17 22:14:53 +01:00
Muhammad Ibrahim
f42c6cc185 feat: Add Server Version management with GitHub integration
- Add Server Version tab in settings
- Add githubRepoUrl field to Settings model
- Add database migration for github_repo_url
- Update settings API to handle GitHub repo URL
- Add version checking UI with current/latest version display
- Default GitHub repo: git@github.com:9technologygroup/patchmon.net.git
2025-09-17 22:07:30 +01:00
Muhammad Ibrahim
9714be788b Modified areas for fqdn usage and use of .env for cors 2025-09-17 12:10:49 +01:00
Muhammad Ibrahim
c5332ce6b0 first commit 2025-09-16 15:36:42 +01:00