-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build to create distributables.
Closes #1.
- Loading branch information
Showing
13 changed files
with
265 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[target.x86_64-unknown-linux-musl] | ||
dockerfile="cross/Dockerfile.x86_64-unknown-linux-musl" | ||
|
||
[target.aarch64-unknown-linux-musl] | ||
dockerfile="cross/Dockerfile.aarch64-unknown-linux-musl" | ||
|
||
[target.armv7-unknown-linux-musleabihf] | ||
dockerfile="cross/Dockerfile.armv7-unknown-linux-musleabihf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ghcr.io/cross-rs/aarch64-unknown-linux-musl:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get --assume-yes install \ | ||
protobuf-compiler \ | ||
libprotobuf-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ghcr.io/cross-rs/armv7-unknown-linux-musleabihf:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get --assume-yes install \ | ||
protobuf-compiler \ | ||
libprotobuf-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM ghcr.io/cross-rs/x86_64-unknown-linux-musl:latest | ||
|
||
RUN apt-get update && \ | ||
apt-get --assume-yes install \ | ||
protobuf-compiler \ | ||
libprotobuf-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# UDP Forwarder configuration. | ||
[udp_forwarder] | ||
|
||
# Log level. | ||
# | ||
# Valid options are: | ||
# * TRACE | ||
# * DEBUG | ||
# * INFO | ||
# * WARN | ||
# * ERROR | ||
# * OFF | ||
log_level="INFO" | ||
|
||
# Log to syslog. | ||
# | ||
# When set to true, log messages are being written to syslog instead of stdout. | ||
log_to_syslog=false | ||
|
||
# Prometheus metrics bind. | ||
# | ||
# E.g. '0.0.0.0:9800', leave blank to disable the metrics endpoint. | ||
metrics_bind="" | ||
|
||
|
||
# Servers to forward the data to using UDP. | ||
# This section can be repeated. | ||
[[udp_forwarder.servers]] | ||
# Server (hostname:port). | ||
server="localhost:1700" | ||
|
||
# Keepalive interval (seconds). | ||
# | ||
# In this interval, the ChirpStack UDP Forwarder will send keepalive | ||
# frames to the server, which must be answered by an acknowledgement. | ||
keepalive_interval_secs=10 | ||
|
||
# Max. allowed keepalive failures. | ||
# | ||
# After the max. number has been reached, the ChirpStack UDP Forwarder will | ||
# 're-connect' to the server, meaning it will also re-resolve the DNS in case | ||
# the server address is a hostname. | ||
keepalive_max_failures=12 | ||
|
||
# Forward CRC OK. | ||
forward_crc_ok=true | ||
|
||
# Forward CRC invalid. | ||
forward_crc_invalid=false | ||
|
||
# Forward CRC missing. | ||
forward_crc_missing=false | ||
|
||
|
||
# Concentratord configuration. | ||
[concentratord] | ||
|
||
# Event API URL. | ||
event_url="ipc:///tmp/concentratord_event" | ||
|
||
# Command API URL. | ||
command_url="ipc:///tmp/concentratord_command" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Set config-file permissions | ||
chown -R chirpstack:chirpstack /etc/chirpstack-udp-forwarder | ||
chmod 750 /etc/chirpstack-udp-forwarder | ||
chmod 640 /etc/chirpstack-udp-forwarder/*.toml | ||
|
||
#DEBHELPER# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Create the ChirpStack user | ||
id chirpstack &>/dev/null | ||
if [[ $? -ne 0 ]]; then | ||
useradd --system -U -M chirpstack -s /bin/false -d /etc/chirpstack | ||
fi | ||
|
||
#DEBHELPER# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=ChirpStack UDP Forwarder | ||
Documentation=https://www.chirpstack.io/ | ||
Wants=network-online.target | ||
After=network-online.target | ||
|
||
[Service] | ||
User=chirpstack | ||
Group=chirpstack | ||
ExecStart=/usr/bin/chirpstack-udp-forwarder -c /etc/chirpstack-udp-forwarder/chirpstack-udp-forwarder.toml | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[toolchain] | ||
channel = "1.77.1" | ||
channel = "1.78.0" | ||
components = ["rustfmt", "clippy"] | ||
profile = "default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,7 @@ pkgs.mkShell { | |
pkgs.cacert | ||
pkgs.rustup | ||
pkgs.protobuf | ||
pkgs.cargo-cross | ||
pkgs.cargo-deb | ||
]; | ||
} |