Skip to content

Commit 5779dda

Browse files
static ports
1 parent 01df7c1 commit 5779dda

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

framework/components/dockercompose/billing_platform_service/billing_platform_service.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ func New(in *Input) (*Output, error) {
111111
// set development defaults for necessary environment variables and allow them to be overridden by the host process
112112
envVars := make(map[string]string)
113113

114-
envVars["BILLING_SERVER_PORT"] = DEFAULT_BILLING_PLATFORM_SERVICE_BILLING_GRPC_PORT
115-
envVars["CREDIT_RESERVATION_SERVER_PORT"] = DEFAULT_BILLING_PLATFORM_SERVICE_CREDIT_GRPC_PORT
116114
envVars["MAINNET_WORKFLOW_REGISTRY_CHAIN_SELECTOR"] = strconv.FormatUint(in.ChainSelector, 10)
117115
envVars["MAINNET_WORKFLOW_REGISTRY_CONTRACT_ADDRESS"] = in.WorkflowRegistryAddress
118116
envVars["MAINNET_WORKFLOW_REGISTRY_RPC_URL"] = in.RPCURL
@@ -159,8 +157,8 @@ func New(in *Input) (*Output, error) {
159157
stack.WaitForService(DEFAULT_BILLING_PLATFORM_SERVICE_SERVICE_NAME,
160158
wait.ForAll(
161159
wait.ForLog("GRPC server is live").WithPollInterval(200*time.Millisecond),
162-
wait.ForListeningPort(nat.Port(envVars["BILLING_SERVER_PORT"])),
163-
wait.ForListeningPort(nat.Port(envVars["CREDIT_RESERVATION_SERVER_PORT"])),
160+
wait.ForListeningPort(nat.Port(DEFAULT_BILLING_PLATFORM_SERVICE_BILLING_GRPC_PORT)),
161+
wait.ForListeningPort(nat.Port(DEFAULT_BILLING_PLATFORM_SERVICE_CREDIT_GRPC_PORT)),
164162
).WithDeadline(1*time.Minute),
165163
)
166164

@@ -247,8 +245,8 @@ func New(in *Input) (*Output, error) {
247245

248246
func getExternalPorts(ctx context.Context, billingExternalHost string, envVars map[string]string, billingContainer *testcontainers.DockerContainer) (*BillingPlatformServiceOutput, error) {
249247
ports := map[string]nat.Port{
250-
"billing": nat.Port(envVars["BILLING_SERVER_PORT"]),
251-
"credit": nat.Port(envVars["CREDIT_RESERVATION_SERVER_PORT"]),
248+
"billing": DEFAULT_BILLING_PLATFORM_SERVICE_BILLING_GRPC_PORT,
249+
"credit": DEFAULT_BILLING_PLATFORM_SERVICE_CREDIT_GRPC_PORT,
252250
}
253251

254252
output := BillingPlatformServiceOutput{}

framework/components/dockercompose/billing_platform_service/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ services:
1414
environment:
1515
DISABLE_AUTH: true
1616
PROMETHEUS_PORT: 2112
17-
BILLING_SERVER_PORT: ${BILLING_SERVER_PORT:-2222}
18-
CREDIT_RESERVATION_SERVER_PORT: ${CREDIT_RESERVATION_SERVER_PORT:-2223}
17+
BILLING_SERVER_PORT: 2222
18+
CREDIT_RESERVATION_SERVER_PORT: 2223
1919
WORKFLOW_OWNERSHIP_PROOF_SERVER_HOST: 0.0.0.0
2020
MAINNET_WORKFLOW_REGISTRY_CHAIN_SELECTOR: ${MAINNET_WORKFLOW_REGISTRY_CHAIN_SELECTOR:-}
2121
TESTNET_WORKFLOW_REGISTRY_CHAIN_SELECTOR: ${MAINNET_WORKFLOW_REGISTRY_CHAIN_SELECTOR:-}

0 commit comments

Comments
 (0)