Skip to content

Commit 947c6de

Browse files
committed
fix port forwarding
1 parent ca45d89 commit 947c6de

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

framework/components/blockchain/aptos.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ func defaultAptos(in *Input) {
2222
in.Image = "aptoslabs/tools:aptos-node-v1.27.2"
2323
}
2424
framework.L.Warn().Msg("Aptos node API can only be exposed on port 8080!")
25+
if in.Port == "" {
26+
// enable default API exposed port
27+
in.Port = "8080"
28+
}
2529
if in.CustomPorts == nil {
26-
in.CustomPorts = append(in.CustomPorts, "8080:8080", "8081:8081")
30+
// enable default API and faucet forwarding
31+
in.CustomPorts = append(in.CustomPorts, fmt.Sprintf("%s:8080", in.Port), "8081:8081")
2732
}
28-
in.Port = "8080"
2933
}
3034

3135
func newAptos(in *Input) (*Output, error) {
@@ -42,6 +46,7 @@ func newAptos(in *Input) (*Output, error) {
4246
if err != nil {
4347
return nil, err
4448
}
49+
exposedPorts = append(exposedPorts, in.Port)
4550

4651
cmd := []string{
4752
"aptos",
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[blockchain_a]
22
type = "aptos"
3-
custom_ports = ["2020", "4050:4050", "8080:8080", "8081:8081"]
3+
port = "9005"
4+
# custom_ports = ["9005:8080", "9006:8081"]
45
docker_cmd_params = ["--skip-metadata-apply"]

0 commit comments

Comments
 (0)