Skip to content

Commit 2588312

Browse files
authored
Merge pull request #26 from canopy-network/fix/host-to-path
Fix/host to path
2 parents 5339475 + 61a82c4 commit 2588312

8 files changed

Lines changed: 201 additions & 69 deletions

File tree

docker_image/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
FROM node:18-alpine AS builder
22

3-
ARG WALLET_DIR
4-
ARG EXPLORER_DIR
53
ARG BRANCH='latest'
64
ARG CLI_DIR
75
ARG BUILD_PATH=cmd/cli
@@ -26,6 +24,7 @@ RUN echo "Building from BRANCH=${BRANCH}" && \
2624
# copy golang
2725
COPY --from=golang:1.23.9-alpine /usr/local/go/ /usr/local/go/
2826
ENV PATH="/usr/local/go/bin:${PATH}"
27+
2928
RUN go version
3029
# Builds
3130
RUN apk update && apk add --no-cache make bash nodejs npm

monitoring-stack/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,19 +169,19 @@ It will also properly configure to expose canopy nodes explorer, rpc and wallet
169169

170170
Node1 config.json
171171
```
172-
"rpcURL": "https://rpc.node1.<YOUR_DOMAIN>:50002",
172+
"rpcURL": "https://node1.<YOUR_DOMAIN>/rpc",
173173
174-
"adminRPCUrl": "https://adminrpc.node1.<YOUR_DOMAIN>:50003",
174+
"adminRPCUrl": "https://node1.<YOUR_DOMAIN>/adminrpc",
175175
176176
"externalAddress": "tcp://node1.<YOUR_DOMAIN>",
177177
```
178178

179179
Node2 config.json
180180

181181
```
182-
"rpcURL": "https://rpc.node2.<YOUR_DOMAIN>:40002",
182+
"rpcURL": "https://node2.<YOUR_DOMAIN>/rpc",
183183
184-
"adminRPCUrl": "https://admin.node2.<YOUR_DOMAIN>:40003",
184+
"adminRPCUrl": "https://node2.<YOUR_DOMAIN>/adminrpc",
185185
186186
"externalAddress": "tcp://node2.<YOUR_DOMAIN>",
187187
```

monitoring-stack/docker-compose.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ services:
2121
dockerfile: ./Dockerfile
2222
network: host
2323
args:
24-
EXPLORER_BASE_PATH: '/'
25-
WALLET_BASE_PATH: '/'
2624
BUILD_PATH: cmd/cli
2725
BIN_PATH: $BIN_PATH
28-
BRANCH: latest
26+
BRANCH: latest
2927
env_file:
3028
- .env
3129
ports:

monitoring-stack/loadbalancer/services/local.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ http:
5050
- web
5151
canopy-monitoring-local:
5252
rule: Host(`monitoring.localhost`)
53-
service: canopy-monitoring
53+
service: canopy-monitoring-local
5454
priority: 1
5555
entryPoints:
5656
- web

monitoring-stack/loadbalancer/services/middleware.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,40 @@ http:
2525
users:
2626
- "canopy:$apr1$GnHnOP0b$zWcOv5kosOuUAuvrlu72C0"
2727

28+
strip-wallet-prefix:
29+
stripPrefix:
30+
prefixes:
31+
- "/wallet"
32+
33+
strip-explorer-prefix:
34+
stripPrefix:
35+
prefixes:
36+
- "/explorer"
37+
38+
strip-rpc-prefix:
39+
stripPrefix:
40+
prefixes:
41+
- "/rpc"
42+
43+
strip-adminrpc-prefix:
44+
stripPrefix:
45+
prefixes:
46+
- "/adminrpc"
47+
48+
# Redirect /wallet to /wallet/
49+
wallet-redirect:
50+
redirectRegex:
51+
regex: "^(.*)/wallet$"
52+
replacement: "${1}/wallet/"
53+
permanent: true
54+
55+
# Redirect /explorer to /explorer/
56+
explorer-redirect:
57+
redirectRegex:
58+
regex: "^(.*)/explorer$"
59+
replacement: "${1}/explorer/"
60+
permanent: true
61+
2862
websocket-headers:
2963
headers:
3064
customRequestHeaders:

0 commit comments

Comments
 (0)