1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-02 02:40:58 +01:00

Allow Aphlict client port to be overridden

Summary: In my use case, I have `notification.client-uri` set to `https://phabricator.example.com/ws/` (which routes to `nginx`) but I need `aphlict` to listen to port `22280`.

Test Plan: Tested in our install.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11337
This commit is contained in:
Joshua Spence 2015-01-13 06:38:39 +11:00
parent 953f281dc0
commit 3d9dd45635

View file

@ -5,6 +5,7 @@ abstract class PhabricatorAphlictManagementWorkflow
private $debug = false; private $debug = false;
private $clientHost; private $clientHost;
private $clientPort;
public function didConstruct() { public function didConstruct() {
$this $this
@ -15,11 +16,17 @@ abstract class PhabricatorAphlictManagementWorkflow
'param' => 'hostname', 'param' => 'hostname',
'help' => pht('Hostname to bind to for the client server.'), 'help' => pht('Hostname to bind to for the client server.'),
), ),
array(
'name' => 'client-port',
'param' => 'port',
'help' => pht('Port to bind to for the client server.'),
),
)); ));
} }
public function execute(PhutilArgumentParser $args) { public function execute(PhutilArgumentParser $args) {
$this->clientHost = $args->getArg('client-host'); $this->clientHost = $args->getArg('client-host');
$this->clientPort = $args->getArg('client-port');
return 0; return 0;
} }
@ -124,7 +131,9 @@ abstract class PhabricatorAphlictManagementWorkflow
$log = PhabricatorEnv::getEnvConfig('notification.log'); $log = PhabricatorEnv::getEnvConfig('notification.log');
$server_argv = array(); $server_argv = array();
$server_argv[] = '--client-port='.$client_uri->getPort(); $server_argv[] = '--client-port='.coalesce(
$this->clientPort,
$client_uri->getPort());
$server_argv[] = '--admin-port='.$server_uri->getPort(); $server_argv[] = '--admin-port='.$server_uri->getPort();
$server_argv[] = '--admin-host='.$server_uri->getDomain(); $server_argv[] = '--admin-host='.$server_uri->getDomain();