diff --git a/chirpstack/configuration/as923.toml b/chirpstack/configuration/as923.toml index 369ad7a8..12b839a5 100644 --- a/chirpstack/configuration/as923.toml +++ b/chirpstack/configuration/as923.toml @@ -34,7 +34,7 @@ command_topic="as923/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/as923_2.toml b/chirpstack/configuration/as923_2.toml index dff1be4e..f71140eb 100644 --- a/chirpstack/configuration/as923_2.toml +++ b/chirpstack/configuration/as923_2.toml @@ -34,7 +34,7 @@ command_topic="as923_2/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/as923_3.toml b/chirpstack/configuration/as923_3.toml index 55ba12cb..992a8ac4 100644 --- a/chirpstack/configuration/as923_3.toml +++ b/chirpstack/configuration/as923_3.toml @@ -34,7 +34,7 @@ command_topic="as923_3/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/as923_4.toml b/chirpstack/configuration/as923_4.toml index ceeb4fdc..6372794b 100644 --- a/chirpstack/configuration/as923_4.toml +++ b/chirpstack/configuration/as923_4.toml @@ -34,7 +34,7 @@ command_topic="as923_4/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_0.toml b/chirpstack/configuration/au915_0.toml index 92206537..67b7969b 100644 --- a/chirpstack/configuration/au915_0.toml +++ b/chirpstack/configuration/au915_0.toml @@ -34,7 +34,7 @@ command_topic="au915_0/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_1.toml b/chirpstack/configuration/au915_1.toml index 3965fcb9..f6b238c5 100644 --- a/chirpstack/configuration/au915_1.toml +++ b/chirpstack/configuration/au915_1.toml @@ -34,7 +34,7 @@ command_topic="au915_1/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_2.toml b/chirpstack/configuration/au915_2.toml index 1f187dfa..6d377379 100644 --- a/chirpstack/configuration/au915_2.toml +++ b/chirpstack/configuration/au915_2.toml @@ -34,7 +34,7 @@ command_topic="au915_2/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_3.toml b/chirpstack/configuration/au915_3.toml index 3498f369..8b82252c 100644 --- a/chirpstack/configuration/au915_3.toml +++ b/chirpstack/configuration/au915_3.toml @@ -34,7 +34,7 @@ command_topic="au915_3/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_4.toml b/chirpstack/configuration/au915_4.toml index 882fd6ce..5d367a9c 100644 --- a/chirpstack/configuration/au915_4.toml +++ b/chirpstack/configuration/au915_4.toml @@ -34,7 +34,7 @@ command_topic="au915_4/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_5.toml b/chirpstack/configuration/au915_5.toml index 6eece4a8..a0ee5d22 100644 --- a/chirpstack/configuration/au915_5.toml +++ b/chirpstack/configuration/au915_5.toml @@ -34,7 +34,7 @@ command_topic="au915_5/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_6.toml b/chirpstack/configuration/au915_6.toml index 0c3c5eac..3a7832cd 100644 --- a/chirpstack/configuration/au915_6.toml +++ b/chirpstack/configuration/au915_6.toml @@ -34,7 +34,7 @@ command_topic="au915_6/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/au915_7.toml b/chirpstack/configuration/au915_7.toml index b7169b3b..0ca4f232 100644 --- a/chirpstack/configuration/au915_7.toml +++ b/chirpstack/configuration/au915_7.toml @@ -34,7 +34,7 @@ command_topic="au915_7/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/chirpstack.toml b/chirpstack/configuration/chirpstack.toml index eaa0c9db..f22e1ef9 100644 --- a/chirpstack/configuration/chirpstack.toml +++ b/chirpstack/configuration/chirpstack.toml @@ -19,7 +19,7 @@ # * require - Always SSL (skip verification) # * verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA) # * verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate) - dsn="postgres://chirpstack:chirpstack@postgres/chirpstack?sslmode=disable" + dsn="postgres://chirpstack:chirpstack@$POSTGRESQL_HOST/chirpstack?sslmode=disable" # Max open connections. # @@ -41,7 +41,7 @@ # # Set multiple addresses when connecting to a cluster. servers=[ - "redis://redis/", + "redis://$REDIS_HOST/", ] # TLS enabled. @@ -99,17 +99,17 @@ [gateway] client_cert_lifetime="365days" - ca_cert="configuration/certs/ca.crt" - ca_key="configuration/certs/ca.key" + ca_cert="configuration/certs/ca.pem" + ca_key="configuration/certs/ca-key.pem" [integration] enabled=["mqtt"] [integration.mqtt] - server="tcp://mosquitto:1883/" + server="tcp://$MQTT_BROKER_HOST:1883/" json=true [integration.mqtt.client] client_cert_lifetime="365days" - ca_cert="configuration/certs/ca.crt" - ca_key="configuration/certs/ca.key" + ca_cert="configuration/certs/ca.pem" + ca_key="configuration/certs/ca-key.pem" diff --git a/chirpstack/configuration/cn779.toml b/chirpstack/configuration/cn779.toml index 3c97fa3c..dd2747f9 100644 --- a/chirpstack/configuration/cn779.toml +++ b/chirpstack/configuration/cn779.toml @@ -34,7 +34,7 @@ command_topic="cn779/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/eu433.toml b/chirpstack/configuration/eu433.toml index a9817264..5dcabe3b 100644 --- a/chirpstack/configuration/eu433.toml +++ b/chirpstack/configuration/eu433.toml @@ -34,7 +34,7 @@ command_topic="eu433/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/eu868.toml b/chirpstack/configuration/eu868.toml index 5a3fd7ec..a8535b5d 100644 --- a/chirpstack/configuration/eu868.toml +++ b/chirpstack/configuration/eu868.toml @@ -34,7 +34,7 @@ command_topic="eu868/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/in865.toml b/chirpstack/configuration/in865.toml index b2bfaee3..86c3c190 100644 --- a/chirpstack/configuration/in865.toml +++ b/chirpstack/configuration/in865.toml @@ -34,7 +34,7 @@ command_topic="in865/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/ism2400.toml b/chirpstack/configuration/ism2400.toml index b2f83c6f..c6aa02fd 100644 --- a/chirpstack/configuration/ism2400.toml +++ b/chirpstack/configuration/ism2400.toml @@ -34,7 +34,7 @@ command_topic="ism2400/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/kr920.toml b/chirpstack/configuration/kr920.toml index 53358768..d736d9f9 100644 --- a/chirpstack/configuration/kr920.toml +++ b/chirpstack/configuration/kr920.toml @@ -34,7 +34,7 @@ command_topic="kr920/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/ru864.toml b/chirpstack/configuration/ru864.toml index 18a47162..8e1164b7 100644 --- a/chirpstack/configuration/ru864.toml +++ b/chirpstack/configuration/ru864.toml @@ -34,7 +34,7 @@ command_topic="ru864/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_0.toml b/chirpstack/configuration/us915_0.toml index 4a21a2c0..d561a235 100644 --- a/chirpstack/configuration/us915_0.toml +++ b/chirpstack/configuration/us915_0.toml @@ -34,7 +34,7 @@ command_topic="us915_0/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_1.toml b/chirpstack/configuration/us915_1.toml index 2554b3a8..8fcc5d74 100644 --- a/chirpstack/configuration/us915_1.toml +++ b/chirpstack/configuration/us915_1.toml @@ -34,7 +34,7 @@ command_topic="us915_1/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_2.toml b/chirpstack/configuration/us915_2.toml index 96dae9e0..9baffa98 100644 --- a/chirpstack/configuration/us915_2.toml +++ b/chirpstack/configuration/us915_2.toml @@ -34,7 +34,7 @@ command_topic="us915_2/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_3.toml b/chirpstack/configuration/us915_3.toml index 8dac6058..bd50ceaf 100644 --- a/chirpstack/configuration/us915_3.toml +++ b/chirpstack/configuration/us915_3.toml @@ -34,7 +34,7 @@ command_topic="us915_3/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_4.toml b/chirpstack/configuration/us915_4.toml index deb3f72e..fdf57a4b 100644 --- a/chirpstack/configuration/us915_4.toml +++ b/chirpstack/configuration/us915_4.toml @@ -34,7 +34,7 @@ command_topic="us915_4/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_5.toml b/chirpstack/configuration/us915_5.toml index 9dc3673b..19be6f32 100644 --- a/chirpstack/configuration/us915_5.toml +++ b/chirpstack/configuration/us915_5.toml @@ -34,7 +34,7 @@ command_topic="us915_5/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_6.toml b/chirpstack/configuration/us915_6.toml index ba76fb95..ddb754c6 100644 --- a/chirpstack/configuration/us915_6.toml +++ b/chirpstack/configuration/us915_6.toml @@ -34,7 +34,7 @@ command_topic="us915_6/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/chirpstack/configuration/us915_7.toml b/chirpstack/configuration/us915_7.toml index e82b473d..3fb4ea63 100644 --- a/chirpstack/configuration/us915_7.toml +++ b/chirpstack/configuration/us915_7.toml @@ -34,7 +34,7 @@ command_topic="us915_7/gateway/{{ gateway_id }}/command/{{ command }}" # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws) - server="tcp://mosquitto:1883" + server="tcp://$MQTT_BROKER_HOST:1883" # Connect with the given username (optional) username="" diff --git a/docker-compose.yml b/docker-compose.yml index e5dff05d..f0769598 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,9 @@ services: - mosquitto environment: - DATABASE_URL=postgres://chirpstack_test:chirpstack_test@postgres/chirpstack_test?sslmode=disable + - REDIS_HOST=redis + - POSTGRESQL_HOST=postgres + - MQTT_BROKER_HOST=mosquitto ports: - "8080:8080"