diff --git a/docker-compose.v2.yml b/docker-compose.v2.yml index 799ef1b..70c3d1e 100644 --- a/docker-compose.v2.yml +++ b/docker-compose.v2.yml @@ -275,13 +275,15 @@ services: container_name: fr2-payment restart: unless-stopped ports: - - "${EDGE_BIND:-0.0.0.0}:${PAY_PORT:-8090}:8080" + # Default to the production port 1607 so the bind works without an ENV_FILE + # edit (8090 collided on the server). Override via PAY_PORT if 1607 is taken. + - "${EDGE_BIND:-0.0.0.0}:${PAY_PORT:-1607}:8080" environment: DATABASE_URL: "postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/flatrender?search_path=payment,public" JWT_SECRET: "${JWT_SECRET}" PORT: "8080" # Externally reachable base — ZarinPal callback + user redirect are built from it. - PUBLIC_BASE_URL: "${PAY_PUBLIC_URL:-http://localhost:8090}" + PUBLIC_BASE_URL: "${PAY_PUBLIC_URL:-http://localhost:1607}" # Shared default ZarinPal merchant (a client_app may override per-site). ZARINPAL_MERCHANT_ID: "${ZARINPAL_MERCHANT_ID:-}" ZARINPAL_SANDBOX: "${ZARINPAL_SANDBOX:-true}" diff --git a/src/app/api/admin/pay/[...path]/route.ts b/src/app/api/admin/pay/[...path]/route.ts index fd5cbe0..bd61680 100644 --- a/src/app/api/admin/pay/[...path]/route.ts +++ b/src/app/api/admin/pay/[...path]/route.ts @@ -16,7 +16,7 @@ export const runtime = "nodejs"; * /api/admin/pay/transactions?... → .../v1/admin/transactions?... */ function paymentBase(): string { - return (process.env.PAYMENT_SVC_URL || "http://localhost:8090").replace(/\/+$/, ""); + return (process.env.PAYMENT_SVC_URL || "http://localhost:1607").replace(/\/+$/, ""); } async function forward(