Files
templates/build-scripts
lefolalan f3c1060443 feat: add ChirpStack LoRaWAN Network Server template (#486)
* feat: add ChirpStack LoRaWAN Network Server template

  Add complete ChirpStack v4 template with:
  - Main ChirpStack server with web UI
  - UDP and Basics Station gateway bridges
  - REST API interface
  - PostgreSQL database with PostGIS extensions
  - Redis cache
  - Mosquitto MQTT broker

Default configuration for EU868 region with secure random credentials. Supports all LoRaWAN frequency bands globally.

* fix(chirpstack): use original configurations from chirpstack-docker repo

Update template.toml to use exact configuration files from the
chirpstack-docker repository instead of simplified versions:

- Use original chirpstack.toml with all 15 enabled regions
- Use original gateway bridge configuration with documentation links
- Use complete Basics Station EU868 config with frequency plans
- Keep original Mosquitto and PostgreSQL initialization scripts

Template size increased from 131 to 219 lines (4.7KB) to include
comprehensive default configurations that match the official setup.

* feat: add all 38 region configuration files

* fix(chirpstack): add volume mounts to expose config files to containers

* fix(chirpstack): remove read-only flag

* fix(chirpstack): correct file paths for configuration mounts in docker-compose and template files

* fix: update volume paths to be on correct directory level

* fix: configure template for dokploy-network with proper DNS resolution

- Add dokploy-network configuration to docker-compose.yml
- Replace environment variable placeholders with actual service hostnames
- Change PostgreSQL DSN from $POSTGRESQL_HOST to postgres
- Change Redis server from $REDIS_HOST to redis
- Replace $MQTT_BROKER_HOST with mosquitto in all 39 region configurations

These changes ensure Docker DNS resolution works correctly by:
- Using dokploy-network (overlay) instead of bridge network
- Using service names directly in TOML config files (TOML doesn't expand env vars)
- Enabling proper service discovery between containers

This resolves DNS resolution failures that caused ChirpStack to fail connecting
to PostgreSQL and MQTT services during deployment.

* fix: add missing network configurations for all services in docker-compose

* feat: add internal services to config.domains for proper network configuration

* Update docker-compose.yml

* fix: enhance domain validation in template validator

- Updated the TemplateValidator to ensure that if the 'host' field is provided, it must be a valid string.
- Added comments to clarify that 'host' is optional for internal services.

* refactor: remove redundant host validation in template validator

- Removed the validation for the 'host' field in the TemplateValidator, as it is optional for internal services and does not require a type check if not provided.

* refactor: remove internal service domain configurations from template

- Eliminated the domain configurations for internal services (Postgres, Redis, Mosquitto) from the template.toml file, streamlining the configuration for better clarity and maintainability.

---------

Co-authored-by: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Co-authored-by: Mauricio Siu <siumauricio@icloud.com>
2025-12-14 00:13:13 -06:00
..