Skip to content

Commit

Permalink
add forwarder in project
Browse files Browse the repository at this point in the history
  • Loading branch information
disk91 committed Jun 7, 2023
1 parent 77283de commit b8f1cca
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ forwarder.name=Helium Forwarder
## fill only when in balancer mode with the capture enpoints
## endpoint does not include /capture path
forwarder.balancer.mode=true
forwarder.balancer.node1.endpoint=http://helium-fwnode1-1:8082
forwarder.balancer.node2.endpoint=http://helium-fwnode1-1:8082
forwarder.balancer.node1.endpoint=http://fwnode1:8082
forwarder.balancer.node2.endpoint=http://fwnode2:8082


## #############################################################
Expand All @@ -20,7 +20,7 @@ forwarder.balancer.node2.endpoint=http://helium-fwnode1-1:8082
## PostgreSQL
spring.datasource.url=jdbc:postgresql://postgres:5432/chirpstack
spring.datasource.username=chirpstack
spring.datasource.password=
spring.datasource.password=<fill db password>

## Forwarder API
# key for JWT signature, please enter a random 64 char string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ forwarder.balancer.node2.endpoint=
## PostgreSQL
spring.datasource.url=jdbc:postgresql://postgres:5432/chirpstack
spring.datasource.username=chirpstack
spring.datasource.password=
spring.datasource.password=<fill db password>

## Forwarder API
# key for JWT signature, please enter a random 64 char string
# run twice echo $RANDOM | md5sum | head -c 32; echo;
helium.jwt.signature.key=
helium.jwt.signature.key=<fill it>

## #############################################################
## Hotspot Position Provider
helium.position.url=
helium.position.url=https://etl.foo.bar/hotspot/3.0/{hs}/pos
helium.position.user=
helium.position.pass=

## #############################################################
## Downlink configuration
helium.downlink.endpoint=
helium.downlink.endpoint=https://console.foo.bar/forwarder1/1.0/downlink/{key}/
chirpstack.api.base=http://chirpstack-rest-api:8090
chirpstack.api.admin.key=
chirpstack.api.admin.key=<fill it>

## #############################################################
## Email configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ forwarder.balancer.node2.endpoint=
## PostgreSQL
spring.datasource.url=jdbc:postgresql://postgres:5432/chirpstack
spring.datasource.username=chirpstack
spring.datasource.password=
spring.datasource.password=<fill db password>

## Forwarder API
# key for JWT signature, please enter a random 64 char string
# run twice echo $RANDOM | md5sum | head -c 32; echo;
helium.jwt.signature.key=
helium.jwt.signature.key=<fill it>

## #############################################################
## Hotspot Position Provider
helium.position.url=
helium.position.url=https://etl.foo.bar/hotspot/3.0/{hs}/pos
helium.position.user=
helium.position.pass=

## #############################################################
## Downlink configuration
helium.downlink.endpoint=
helium.downlink.endpoint=https://console.foo.bar/forwarder2/1.0/downlink/{key}/
chirpstack.api.base=http://chirpstack-rest-api:8090
chirpstack.api.admin.key=
chirpstack.api.admin.key=<fill it>

## #############################################################
## Email configuration
Expand Down
27 changes: 27 additions & 0 deletions chirpstack/configuration/nginx/default.conf.withssl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ upstream chirpstack {
upstream chirpstack-api {
server chirpstack-rest-api:8090;
}
# uncomment when forwarder is deployed
#upstream node1 {
# server fwnode1:8082;
#}
#upstream node2 {
# server fwnode2:8082;
#}
map $arg_override $override {
true chirpstack;
default front;
Expand Down Expand Up @@ -44,6 +51,26 @@ server {
proxy_set_header Host $http_host;
}

# uncomment when forwarder is deployed
# location ~ ^(/forwarder1/) {
# rewrite ^/forwarder1/(.*) /forwarder/$1 break;
# proxy_pass http://node1;
# proxy_redirect off;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# }

# location ~ ^(/forwarder2/) {
# rewrite ^/forwarder2/(.*) /forwarder/$1 break;
# proxy_pass http://node2;
# proxy_redirect off;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
# }


location ~ ^(/front/|/_nuxt/|/_loading/|/__webpack_hmr/|/static/front/) {
root /var/www/front;
}
Expand Down
6 changes: 3 additions & 3 deletions chirpstack/docker-compose.withforwarder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ services:
image: disk91/forwarder:1.0.0
restart: unless-stopped
volumes:
- /helium/forwarder/loadbalancer.properties:/configuration.properties
- /helium/configuration/forwarder/loadbalancer.properties:/configuration.properties
ports:
- 8100:8082

fwnode1:
image: disk91/forwarder:2.0.0
restart: unless-stopped
volumes:
- /helium/forwarder/node1.properties:/configuration.properties
- /helium/configuration/forwarder/node1.properties:/configuration.properties

fwnode2:
image: disk91/forwarder:2.0.0
restart: unless-stopped
volumes:
- /helium/forwarder/node2.properties:/configuration.properties
- /helium/configuration/forwarder/node2.properties:/configuration.properties


helium:
Expand Down

0 comments on commit b8f1cca

Please sign in to comment.