From 637b44a9e0e11a18d25742b525534843d82c51db Mon Sep 17 00:00:00 2001 From: asepharyana Date: Sun, 2 Aug 2026 16:15:43 +0700 Subject: [PATCH] chore: port 3000 to 4002, use domain instead of IP --- flake.lock | 61 +++++++++++++++++++++++++++++++++++++++++++ manifest_current.json | 6 ++--- result | 1 + setup_app.py | 2 +- start_server.py | 2 +- 5 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 flake.lock create mode 120000 result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..617b2f3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1785301185, + "narHash": "sha256-eoS3KQTO0aPWXZvIaRbRAzSSHW3l5wdMFXtT1ISfoKA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9bc02893134c733dd85de46ee4fb2fac696b5529", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/manifest_current.json b/manifest_current.json index 0640c10..9bce6be 100644 --- a/manifest_current.json +++ b/manifest_current.json @@ -2,12 +2,12 @@ "name": "pr-agent-auto-review", "url": "https://github.com/asepharyana", "hook_attributes": { - "url": "http://45.127.35.244:3000/api/v1/github_webhooks", + "url": "https://pr-agent.asepharyana.my.id/api/v1/github_webhooks", "active": true }, - "redirect_url": "http://45.127.35.244:3000/setup/callback", + "redirect_url": "https://pr-agent.asepharyana.my.id/setup/callback", "callback_urls": [ - "http://45.127.35.244:3000/setup/callback" + "https://pr-agent.asepharyana.my.id/setup/callback" ], "public": false, "default_events": [ diff --git a/result b/result new file mode 120000 index 0000000..6df9d27 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/a2a5pi2w5racrrp9f890wgzsc8zb9zgq-pr-agent-server-1.0.0 \ No newline at end of file diff --git a/setup_app.py b/setup_app.py index 57d2a37..552b287 100644 --- a/setup_app.py +++ b/setup_app.py @@ -16,7 +16,7 @@ APP_SLUG = "pr-agent-auto" DESCRIPTION = "Automated PR review and merge bot powered by AI" HOME_URL = "https://github.com/asepharyana" PUBLIC_IP = "45.127.35.244" -PORT = 3000 +PORT = 4002 WEBHOOK_URL = f"http://{PUBLIC_IP}:{PORT}/api/v1/github_webhooks" REDIRECT_URL = f"http://{PUBLIC_IP}:{PORT}/app-setup-complete" CALLBACK_URLS = [f"http://{PUBLIC_IP}:{PORT}/callback"] diff --git a/start_server.py b/start_server.py index fc38118..f5d132b 100644 --- a/start_server.py +++ b/start_server.py @@ -10,6 +10,6 @@ from pr_agent.servers.github_app import app import uvicorn if __name__ == '__main__': - port = int(os.environ.get("PORT", "3000")) + port = int(os.environ.get("PORT", "4002")) print(f"Starting PR-Agent GitHub App server on 0.0.0.0:{port}") uvicorn.run(app, host="0.0.0.0", port=port, log_level="info")