stacks-network / stacks-blockchain-docker

Stacks-blockchain with API using docker compose
GNU General Public License v3.0
27 stars 37 forks source link

Adding a proxy container #56

Closed wileyj closed 2 years ago

wileyj commented 2 years ago

Adding nginx as a proxy container running on port 80, proxying to the API container.

adjuste the controller manage.sh script by adding an extra flag to the args that can be used like: ./manage.sh mainnet start proxy which will launch an nginx proxy:

$ curl -sL localhost/v2/info | jq
{
  "peer_version": 402653189,
  "pox_consensus": "dd95433864e152b5368b0ed8ec184ec376b62c67",
  "burn_block_height": 667545,
  "stable_pox_consensus": "60a10bc9f28f1f32f08d61296bfa18f2079850fa",
  "stable_burn_block_height": 667538,
  "server_version": "stacks-node 2.05.0.1.0 (master:de541f9, release build, linux [x86_64])",
  "network_id": 1,
  "parent_network_id": 3652501241,
  "stacks_tip_height": 1136,
  "stacks_tip": "aadf3d2c6d0a434bea6941d716b69f912182cd6634b527219f4279388ee7523f",
  "stacks_tip_consensus_hash": "f375404ca323d8090f796efeb39db03016121c62",
  "genesis_chainstate_hash": "74237aa39aa50a83de11a4f53e9d3bb7d43461d1de9873f402e5453ae60bc59b",
  "unanchored_tip": "62ad94bbb647e795de4e85f19da77277bb6451093a22a4c4b104b3c0092c597a",
  "unanchored_seq": 0,
  "exit_at_block_height": null
}
$ curl -sL localhost | jq
{
  "server_version": "stacks-blockchain-api v2.1.1 (master:d7624e13)",
  "status": "ready"
}