@@ -16,24 +16,27 @@ services:
16
16
command : node-daemon mainnet
17
17
environment :
18
18
<< : *ml-common-env
19
- # Note:
20
- # The default rpc bind address is '127.0.0.1', so it'll only be reachable from the same
21
- # container; to make it reachable from other containers, we need to set it to '0.0.0.0'.
19
+ # For rpc, the default rpc bind address is '127.0.0.1', so it'll only be reachable from the
20
+ # same container; to make it reachable from other containers or from the host machine, we
21
+ # have to set it to '0.0.0.0'.
22
+ ML_MAINNET_NODE_RPC_BIND_ADDRESS : 0.0.0.0:3030
22
23
# For p2p, the default address is already '0.0.0.0'. But it's better to use the same port
23
24
# as the one exposed on the host system, otherwise other nodes won't be able to establish
24
25
# outbound connections to this node.
25
26
# Details: the node determines its own "public" p2p address by combining its ip address
26
27
# as it is seen by a peer with the port that it is listening on; this address is then
27
28
# advertised to other peers and propagated through the network. So, if the listening port
28
29
# differs from the one exposed on the host, the advertised address will be incorrect.
29
- ML_MAINNET_NODE_RPC_BIND_ADDRESS : 0.0.0.0:3030
30
30
ML_MAINNET_NODE_P2P_BIND_ADDRESSES : 0.0.0.0:$NODE_P2P_HOST_PORT
31
31
# Rpc username and password.
32
32
ML_MAINNET_NODE_RPC_USERNAME : $NODE_RPC_USERNAME
33
33
ML_MAINNET_NODE_RPC_PASSWORD : $NODE_RPC_PASSWORD
34
34
ports :
35
35
# This is only needed if you want to access the node's rpc interface from the host system.
36
- - " $NODE_RPC_HOST_PORT:3030"
36
+ # Note that here we also set the ip address to bind to on the host to 127.0.0.1; because of
37
+ # this, rpc connections will only be allowed from the host machine and not from the "outside
38
+ # world".
39
+ - " 127.0.0.1:$NODE_RPC_HOST_PORT:3030"
37
40
# This is only needed if you want the node to be able to accept incoming p2p connections
38
41
# from other nodes.
39
42
- " $NODE_P2P_HOST_PORT:$NODE_P2P_HOST_PORT"
@@ -49,7 +52,7 @@ services:
49
52
ports :
50
53
# This is only needed if you want to examine the contents of the db from the host system,
51
54
# e.g. via PgAdmin.
52
- - " $API_SERVER_POSTGRES_HOST_PORT:5432"
55
+ - " 127.0.0.1: $API_SERVER_POSTGRES_HOST_PORT:5432"
53
56
volumes :
54
57
# Explicitly mount postgres docker image's mount point to a named volume (without this,
55
58
# docker will create an anonymous volume instead).
@@ -102,28 +105,30 @@ services:
102
105
- node-daemon
103
106
environment :
104
107
<< : *ml-common-env
105
- ML_WALLET_RPC_DAEMON_NODE_RPC_ADDRESS : node-daemon:3030
106
- ML_WALLET_RPC_DAEMON_NODE_RPC_USERNAME : $NODE_RPC_USERNAME
107
- ML_WALLET_RPC_DAEMON_NODE_RPC_PASSWORD : $NODE_RPC_PASSWORD
108
- ML_WALLET_RPC_DAEMON_RPC_BIND_ADDRESS : 0.0.0.0:3034
109
- ML_WALLET_RPC_DAEMON_RPC_USERNAME : $WALLET_RPC_DAEMON_USERNAME
110
- ML_WALLET_RPC_DAEMON_RPC_PASSWORD : $WALLET_RPC_DAEMON_PASSWORD
108
+ ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_ADDRESS : node-daemon:3030
109
+ ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_USERNAME : $NODE_RPC_USERNAME
110
+ ML_MAINNET_WALLET_RPC_DAEMON_NODE_RPC_PASSWORD : $NODE_RPC_PASSWORD
111
+ # Same as for the node, the default rpc bind address is '127.0.0.1' here; we need to set it
112
+ # to '0.0.0.0' to make it reachable from other containers/host machine.
113
+ ML_MAINNET_WALLET_RPC_DAEMON_RPC_BIND_ADDRESS : 0.0.0.0:3034
114
+ ML_MAINNET_WALLET_RPC_DAEMON_RPC_USERNAME : $WALLET_RPC_DAEMON_USERNAME
115
+ ML_MAINNET_WALLET_RPC_DAEMON_RPC_PASSWORD : $WALLET_RPC_DAEMON_PASSWORD
111
116
ports :
112
- - " $WALLET_RPC_DAEMON_HOST_PORT:3034"
117
+ - " 127.0.0.1: $WALLET_RPC_DAEMON_HOST_PORT:3034"
113
118
114
119
# wallet-cli is not a real service; we just need a service definition for it in order to be able
115
120
# to run it via "docker compose run"
116
121
wallet-cli :
117
122
<< : *ml-common
118
123
image : $DOCKERHUB_USERNAME/wallet-cli:$ML_SOFTWARE_VERSION
119
- command : wallet-cli
124
+ command : wallet-cli mainnet
120
125
depends_on :
121
126
- node-daemon
122
127
environment :
123
128
<< : *ml-common-env
124
- ML_WALLET_NODE_RPC_ADDRESS : node-daemon:3030
125
- ML_WALLET_NODE_RPC_USERNAME : $NODE_RPC_USERNAME
126
- ML_WALLET_NODE_RPC_PASSWORD : $NODE_RPC_PASSWORD
129
+ ML_MAINNET_WALLET_NODE_RPC_ADDRESS : node-daemon:3030
130
+ ML_MAINNET_WALLET_NODE_RPC_USERNAME : $NODE_RPC_USERNAME
131
+ ML_MAINNET_WALLET_NODE_RPC_PASSWORD : $NODE_RPC_PASSWORD
127
132
profiles :
128
133
# Put it in a separate profile, so that it's not started automatically by "docker compose up".
129
134
- wallet_cli
0 commit comments