Skip to content

Commit

Permalink
fix: some localnet proxy tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcampbell committed Jun 23, 2024
1 parent 5814dfb commit e191336
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/algokit/core/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,10 @@ def get_proxy_config(algod_port: int = DEFAULT_ALGOD_PORT, kmd_port: int = 4002)
listen {algod_port};
location / {{
proxy_http_version 1.1;
proxy_read_timeout 120s;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_pass_header Server;
set $target http://algod:8080;
proxy_pass $target;
Expand All @@ -468,7 +471,9 @@ def get_proxy_config(algod_port: int = DEFAULT_ALGOD_PORT, kmd_port: int = 4002)
listen {kmd_port};
location / {{
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_pass_header Server;
set $target http://algod:7833;
proxy_pass $target;
Expand All @@ -479,7 +484,9 @@ def get_proxy_config(algod_port: int = DEFAULT_ALGOD_PORT, kmd_port: int = 4002)
listen 8980;
location / {{
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_pass_header Server;
set $target http://indexer:8980;
proxy_pass $target;
Expand All @@ -502,6 +509,7 @@ def get_docker_compose_yml(
container_name: "{name}_algod"
image: {ALGORAND_IMAGE}
ports:
- 7833
- {tealdbg_port}:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ services:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
container_name: "algokit_sandbox_test_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
container_name: "algokit_sandbox_algod"
image: algorand/algod:latest
ports:
- 7833
- 9392:9392
environment:
START_KMD: 1
Expand Down
7 changes: 7 additions & 0 deletions tests/localnet/test_sandbox.test_proxy_config.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ http {
listen 4001;

location / {
proxy_http_version 1.1;
proxy_read_timeout 120s;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_pass_header Server;
set $target http://algod:8080;
proxy_pass $target;
Expand All @@ -32,7 +35,9 @@ http {
listen 4002;

location / {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_pass_header Server;
set $target http://algod:7833;
proxy_pass $target;
Expand All @@ -43,7 +48,9 @@ http {
listen 8980;

location / {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection "";
proxy_pass_header Server;
set $target http://indexer:8980;
proxy_pass $target;
Expand Down

0 comments on commit e191336

Please sign in to comment.