Commit Graph

36 Commits

Author SHA1 Message Date
AdamT20054
01a8bd6c77 Add signup API endpoint for user registration 2025-09-21 03:23:55 +01:00
AdamT20054
d210d6adde Update Dockerfile to install OpenSSL and simplify startup command 2025-09-21 03:23:33 +01:00
AdamT20054
229ba4f7be Add Docker configuration for PostgreSQL, backend, and frontend services 2025-09-21 01:43:34 +01:00
Muhammad Ibrahim
9a3827dced Fix hardcoded 1.2.4 values - make frontend load current version from API on mount and update User-Agent dynamically 2025-09-20 14:49:05 +01:00
Muhammad Ibrahim
d687ec4e45 Make version detection dynamic - read from package.json instead of hardcoded values 2025-09-20 14:44:42 +01:00
Muhammad Ibrahim
bbd7769b8c Fix hardcoded version numbers in backend - update to 1.2.5 v1.2.5 2025-09-20 13:48:25 +01:00
Muhammad Ibrahim
8245c6b90d Remove manage-patchmon.sh from git tracking
- manage-patchmon.sh is in .gitignore and should not be tracked
- Both management scripts should remain local only
- Scripts are generated during deployment process
2025-09-20 13:28:07 +01:00
Muhammad Ibrahim
1afb9c1ed3 Remove manage-patchmon-dev.sh from git tracking
- manage-patchmon-dev.sh should remain local only
- Only manage-patchmon.sh should be tracked in git
- Dev script is for local development use
2025-09-20 13:27:28 +01:00
Muhammad Ibrahim
417942f674 Add automatic branch switching for updates
- Added branch detection and switching logic to both scripts
- manage-patchmon-dev.sh: automatically switches instances to dev branch
- manage-patchmon.sh: automatically switches instances to main branch
- Handles local changes by stashing before branch switch
- Creates local branch from origin if it doesn't exist locally
- Fixes issue where main branch instances couldn't be updated with dev script
2025-09-20 13:26:51 +01:00
Muhammad Ibrahim
75a4b4a912 Add jq installation to essential tools
- Added jq to essential tools installation in both manage-patchmon.sh and manage-patchmon-dev.sh
- jq is useful for JSON processing and API interactions
- Updated installation check to include jq command availability
- Enhanced status message to show all installed tools
2025-09-20 13:20:17 +01:00
Muhammad Ibrahim
4576781900 Improve agent version logic in manage-patchmon.sh
- Added priority-based version detection (agent script > codebase > package.json > database)
- Always update agent script content during updates, even if version exists
- Improved logging and fallback to 1.2.5
- Consistent behavior with manage-patchmon-dev.sh
2025-09-20 13:07:02 +01:00
Muhammad Ibrahim
0d10d7ee9b Bump version to 1.2.5
- Updated root package.json to 1.2.5
- Updated backend package.json to 1.2.5
- Updated frontend package.json to 1.2.5
- Agent script already has AGENT_VERSION=1.2.5
2025-09-20 13:02:24 +01:00
Muhammad Ibrahim
1cdd6eba6d Added better view on host details and improved filtering 2025-09-20 12:40:31 +01:00
Muhammad Ibrahim
adb207fef9 improved table views and added more host information 2025-09-20 10:56:59 +01:00
Muhammad Ibrahim
216c9dbefa improved duplicate repo handling 2025-09-19 16:07:29 +01:00
Muhammad Ibrahim
52d6d46ea3 Merge branch 'main' of github.com:9technologygroup/patchmon.net 2025-09-19 16:01:45 +01:00
Muhammad Ibrahim
6bc4316fbc fixed duplicated repo url issue 2025-09-19 15:59:45 +01:00
9 Technology Group LTD
b1470f57a8 Create README.md 2025-09-19 11:36:45 +01:00
Muhammad Ibrahim
51d6dd63b1 added server.js for frontend when not using nginx in deployment 2025-09-18 22:59:50 +01:00
Muhammad Ibrahim
2d7a3c3103 Added mfa and css enhancements 2025-09-18 20:14:54 +01:00
Muhammad Ibrahim
5bdd0b5830 upgraded version v1.2.4 2025-09-18 02:09:42 +01:00
Muhammad Ibrahim
98cadb1ff1 added the right version of patchmon 2025-09-18 01:50:15 +01:00
Muhammad Ibrahim
42a6b7e19c added ability to save the custom ssh id path 2025-09-18 01:31:07 +01:00
Muhammad Ibrahim
e35f96d30f added deploy key custom ssh path 2025-09-18 01:19:43 +01:00
Muhammad Ibrahim
08f82bc795 added ability to specify deploy key path 2025-09-18 01:02:51 +01:00
Muhammad Ibrahim
c497c1db2a chore: Remove manage-patchmon.sh from Git tracking
- Remove manage-patchmon.sh from Git tracking as it's in .gitignore
- File should only exist locally and be hosted separately
- This prevents accidental commits of the management script
2025-09-17 23:44:48 +01:00
Muhammad Ibrahim
5b7e7216e8 fix: Improve Prisma migration execution with multiple fallback methods
- Add multiple fallback methods to run Prisma migrations
- Try npx first, then direct binary paths with chmod +x
- Add fallback to install Prisma if not found
- Apply same fixes to both update_instance and small management script
- Resolves 'Permission denied' error when running prisma migrate deploy

This ensures migrations work even when npx has permission issues
or when Prisma binaries need executable permissions.
2025-09-17 23:43:23 +01:00
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