Host ts-nitro example site through Caddy

This commit is contained in:
Thomas E Lackey 2024-04-22 18:02:52 -05:00
parent 4111e88d53
commit 500815fb1e
3 changed files with 10 additions and 3 deletions

View File

@ -81,6 +81,7 @@ services:
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
CERC_NITRO_TARGET_URL: ${CERC_NITRO_TARGET_URL:-http://localhost:5678}
CERC_RUNTIME_ENV_RPC_URL: ${CERC_RUNTIME_ENV_RPC_URL:-ws://localhost:8546}
PUBLIC_URL: http://localhost:5678/ts-nitro
env_file:
- ../config/nitro-auth/charlie.env
entrypoint: ["bash", "-c", "/app/run.sh"]
@ -93,8 +94,6 @@ services:
timeout: 5s
retries: 100
start_period: 100s
ports:
- "3000"
go-nitro-bootnode:
image: cerc/go-nitro:local

View File

@ -17,3 +17,5 @@ CERC_NITRO_RPC_PORT=4007
CERC_NITRO_UI_PORT=4107
CERC_NITRO_USE_DURABLE_STORE=true
CERC_NITRO_WS_MSG_PORT=5007
CERC_NITRO_MSG_PUBLIC_IP=127.0.0.1
CERC_NITRO_MSG_PUBLIC_PORT=5007

View File

@ -15,6 +15,7 @@
rewrite * /
reverse_proxy {$CERC_ETH_RPC_ENDPOINT} {
header_up Host {upstream_hostport}
header_up -X-Forwarded-*
}
}
@ -29,6 +30,7 @@
rewrite * /
reverse_proxy {$CERC_ETH_RPC_ENDPOINT} {
header_up Host {upstream_hostport}
header_up -X-Forwarded-*
}
}
@ -36,7 +38,11 @@
respond "401 Unauthorized" 401
}
handle /ts-nitro* {
reverse_proxy http://ts-nitro-charlie:3000
}
handle {
reverse_proxy http://go-nitro-alice:4206
}
}
}