Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
bfb8a12
new wika plugin
seniorbeto Jul 15, 2025
d6186b9
plugin docs development
seniorbeto Jul 15, 2025
1c78269
little change in tabulations
seniorbeto Jul 15, 2025
ad29fc9
Merge pull request #46 from seniorbeto/develop-wikapew1000
bautisflow Jul 15, 2025
91c99dc
Update link to plugin image
bautisflow Jul 15, 2025
398bd56
chirpstack plugin squeleton
seniorbeto Jul 16, 2025
31e6079
renaming
seniorbeto Jul 16, 2025
607e8f2
advencements with uplinks
seniorbeto Jul 16, 2025
839aea5
Merge pull request #2 from seniorbeto/develop-wikapew1000
seniorbeto Jul 23, 2025
6117bdf
changes in uplink treatement
seniorbeto Jul 24, 2025
b6b449b
uplink stornig downlink info
seniorbeto Jul 24, 2025
70f12ad
frontend changes
seniorbeto Jul 24, 2025
20c1679
from ttn to chirpstack
seniorbeto Jul 24, 2025
d87e739
Merge pull request #3 from seniorbeto/develop-wikapew1000
seniorbeto Jul 28, 2025
dc19d04
add server URL in application
seniorbeto Jul 28, 2025
dedb31d
downlink handlers
seniorbeto Jul 28, 2025
ad9dae4
Merge pull request #49 from thinger-io/main
seniorbeto Aug 12, 2025
6fdce59
standarize ttn uplink format
seniorbeto Aug 13, 2025
de911bf
downlinks following thinger standard
seniorbeto Aug 13, 2025
9658e8f
Merge pull request #50 from seniorbeto/develop-snrbeto-chirpstack-plugin
seniorbeto Aug 13, 2025
412cb62
downlink endpoint
seniorbeto Aug 13, 2025
fea77c5
little downlinks advancements
seniorbeto Aug 13, 2025
c6ae06d
Create secrets_scan.yml
seniorbeto Aug 20, 2025
a78402a
Update secrets_scan.yml
seniorbeto Aug 20, 2025
eedceff
Update secrets_scan.yml
seniorbeto Aug 20, 2025
8c86acb
Update secrets_scan.yml
seniorbeto Aug 20, 2025
153ebbd
Update secrets_scan.yml
seniorbeto Aug 20, 2025
bda59ae
Merge pull request #51 from thinger-io/main
seniorbeto Aug 20, 2025
e8a613a
quick fix for non-template devices at ttn
seniorbeto Aug 20, 2025
2150363
test new gh action
seniorbeto Aug 20, 2025
eedfba4
fix env vars
seniorbeto Aug 20, 2025
1417fcc
update TTN readme
seniorbeto Aug 20, 2025
a09d00a
Merge pull request #52 from thinger-io/develop/wika-pew1000
seniorbeto Aug 20, 2025
df6da9a
added support for new LNSs uplinks standard format
seniorbeto Aug 20, 2025
11d16f7
comet Tx5-6xx pluging
seniorbeto Aug 21, 2025
f1010d4
Merge pull request #53 from thinger-io/develop/comet-tx
seniorbeto Aug 21, 2025
5ad839d
WIKA PEW1000 update
seniorbeto Aug 21, 2025
0f78c3b
ups
seniorbeto Aug 26, 2025
13090b9
Merge pull request #54 from thinger-io/develop/ttn
seniorbeto Aug 27, 2025
df52a84
Merge pull request #55 from thinger-io/develop/loriot
seniorbeto Aug 27, 2025
14efdb3
Merge pull request #56 from thinger-io/develop/wika-pew1000
seniorbeto Aug 27, 2025
3e38e16
fix for LORIOT version control
seniorbeto Aug 27, 2025
0eacecb
Merge remote-tracking branch 'origin/main' into develop/dragino-lt22222l
seniorbeto Aug 27, 2025
2b03e90
Merge pull request #57 from thinger-io/develop/dragino-lt22222l
seniorbeto Aug 27, 2025
de387e6
Update dragino LT22222L documentation
seniorbeto Aug 27, 2025
ea62c9f
Merge pull request #59 from thinger-io/develop/dragino-lt22222l
seniorbeto Aug 27, 2025
0395f82
fixed downlink bug in dragino lt22222l
seniorbeto Aug 27, 2025
f8a18b8
Merge pull request #60 from thinger-io/develop/dragino-lt22222l
seniorbeto Aug 27, 2025
3dcb25b
Merge pull request #61 from thinger-io/main
seniorbeto Aug 28, 2025
fce7bd6
Port form in Frontend and functional Downlink messages
seniorbeto Sep 2, 2025
23aedcf
Liitle change to check new repo-variables
seniorbeto Sep 2, 2025
0ded8d9
Liitle change to check new repo-variables
seniorbeto Sep 2, 2025
d2a2591
Update Chirpstack README
seniorbeto Sep 3, 2025
67b03b4
Beginning of announcement
seniorbeto Sep 3, 2025
b2d1cad
Finished ChirpStack Announcement
seniorbeto Sep 3, 2025
b35ebe1
Merge pull request #62 from thinger-io/develop/chirpstack
seniorbeto Sep 24, 2025
fe5ed3b
Add: New Chirpstack Logo for Marketplace
seniorbeto Oct 2, 2025
c1ab1d7
Add: Initial files for wika pgw23-100 plugin
seniorbeto Oct 8, 2025
bbf3dba
Add: mkdocs feature and readme
seniorbeto Oct 8, 2025
ad935ce
Fix: typo
seniorbeto Oct 8, 2025
8250481
Merge pull request #63 from thinger-io/develop/wika/pgw23-100
seniorbeto Oct 8, 2025
f6d9f14
Fix: image URL
seniorbeto Oct 8, 2025
da60536
Merge pull request #64 from thinger-io/develop/wika/pgw23-100
seniorbeto Oct 8, 2025
ee57319
Add: WIKA plugin announcement
seniorbeto Oct 8, 2025
b977f12
Fix: plugin changelog date
seniorbeto Oct 8, 2025
1f2ed3c
Merge pull request #65 from thinger-io/develop/wika/pgw23-100
seniorbeto Oct 8, 2025
1d42e7a
Restore ttn-stack plugin as deprecated
alvarolb Oct 16, 2025
cafff06
Update dockerhub-description action to v5
alvarolb Oct 16, 2025
4f8c1b7
Add: LoRaWAN product template squeleton files
seniorbeto Oct 22, 2025
4d59f0a
Fix: Plugin image and mkdocs include
seniorbeto Oct 22, 2025
287d751
Merge pull request #66 from thinger-io/develop/lorawan-product-template
seniorbeto Oct 22, 2025
25ce30a
Fix: version 1.0.1 of wika-pgw23-100
seniorbeto Oct 23, 2025
aac8209
Fix: Dummy change to re-upload wika plugin to marketplace
seniorbeto Oct 23, 2025
37eed9d
Fix: Fix version in wika plugin.json
seniorbeto Oct 23, 2025
42ab664
Update: version 1.0.1 in LoRaWAN Product Template
seniorbeto Nov 6, 2025
858aaae
Add: teltonika telematics v1.0.0
seniorbeto Nov 6, 2025
ee7e1f1
Add: teltonika eye v1.0.0
seniorbeto Nov 6, 2025
c53dbdd
Merge pull request #68 from thinger-io/develop/teltonika/telematics
seniorbeto Nov 6, 2025
b716a24
Merge branch 'main' into develop/teltonika/eye
seniorbeto Nov 6, 2025
99617e6
Merge pull request #69 from thinger-io/develop/teltonika/eye
seniorbeto Nov 6, 2025
02476a8
Fixed bug in ttn plugin (v2.0.1)
seniorbeto Nov 10, 2025
36396ef
Fix: plugin version in ttn-changelog
seniorbeto Nov 11, 2025
e5eebcf
Merge pull request #70 from thinger-io/main
seniorbeto Nov 11, 2025
573d635
Fix: update actions for error-prevention
seniorbeto Nov 11, 2025
025762d
Fix: v2.0.2
seniorbeto Nov 11, 2025
78eb7db
Merge pull request #71 from thinger-io/develop/ttn
seniorbeto Nov 11, 2025
69d4b4a
Add: comienzo de ttn v2.1.0
seniorbeto Nov 11, 2025
11f24ba
Fix: await async function
seniorbeto Nov 11, 2025
844dcc5
Fix: bug in http route URI
seniorbeto Nov 11, 2025
f6b3ae0
Fix: bug in http route URI (2)
seniorbeto Nov 11, 2025
c75a5cd
Fix: bug in http route URI (3)
seniorbeto Nov 12, 2025
4e4aab3
Fix: bug in http route URI (4)
seniorbeto Nov 12, 2025
b85d3d4
Fix: bug in http route URI (5)
seniorbeto Nov 12, 2025
015e1b2
Fix: bug in http route URI (6)
seniorbeto Nov 12, 2025
18a3fd2
Fix: cambios en el frontend (ajuste automático de pantalla de eventos)
seniorbeto Nov 12, 2025
5421552
Fix: pequeño cambio de calidad de vida en la eliminación de eventos d…
seniorbeto Nov 12, 2025
ce3882d
Add: changelog actualizado
seniorbeto Nov 12, 2025
677ba07
Merge pull request #73 from thinger-io/develop/ttn
seniorbeto Nov 12, 2025
7dd984e
Merge pull request #74 from thinger-io/main
seniorbeto Nov 12, 2025
56d2b5f
Add: comienzo de v1.1.0 Chirpstack plugin
seniorbeto Nov 13, 2025
f87c3e8
Add: avances en los componentes de angular (frontend de chirpstack)
seniorbeto Nov 13, 2025
0a49ccb
Add: frontend con tabs y sistema de errores MUY mejorado
seniorbeto Nov 13, 2025
5316e66
Add: changelog corregido
seniorbeto Nov 13, 2025
fffc86e
Merge pull request #75 from thinger-io/develop/chirpstack
seniorbeto Nov 13, 2025
35b6aae
Merge pull request #76 from thinger-io/main
seniorbeto Nov 13, 2025
591e3ed
Add: frontend con tabs y sistema de errores MUY mejorado (ttn)
seniorbeto Nov 13, 2025
2911c78
Merge pull request #77 from thinger-io/develop/ttn
seniorbeto Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ jobs:
thinger/${{ matrix.plugin }}-plugin:${{ env.docker_version }}

- name: Update README in DockerHub
continue-on-error: true
if: ${{ steps.check_dockerfile.outputs.files_exists == 'true' && env.branch == 'main' }}
uses: peter-evans/dockerhub-description@v4
uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/secrets_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Secrets Scan
on:
push:
branches: [ "**" ]
pull_request:
workflow_dispatch:

permissions:
contents: read
security-events: write
pull-requests: write # opcional (comentarios en PR)

jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }

- name: Run Gitleaks (official)
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
21 changes: 21 additions & 0 deletions chirpstack/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

## [1.1.0] - 2025-11-15

### Added

- Added User events Queue in Chirpstack Backend
- Significantly improved error handling and reporting
- Cleaner visualization with tabs for different plugin configuration sections

### Fix

- Fixed issue with HTTP code 200 response handling

## [1.0.0] - 2025-06-30

### Added

- Created a new version of chirpstack integration plugin

[1.0.0]: https://github.com/thinger-io/plugins/
21 changes: 21 additions & 0 deletions chirpstack/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025-Current Thinger.io (INTERNET OF THINGER S.L.)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
123 changes: 123 additions & 0 deletions chirpstack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# ChirpStack

<p align="center">
<img src="/plugins/chirpstack/assets/chirpstack-logo.png" alt="ChirpStack logo" style="max-width: 200px; height: auto;" onerror="this.src='https://marketplace.thinger.io/plugins/chirpstack/assets/chirpstack-logo.png';this.onerror='';">
</p>

ChirpStack is a flexible, open-source LoRaWAN® Network Server that allows organisations to deploy and operate their own private or public IoT networks with full control over infrastructure and data. It is widely used by companies, research institutions, and communities looking for reliable large-scale LoRaWAN deployments without vendor lock-in.

With Thinger.io, ChirpStack users can easily extend their networks by adding powerful tools for storing, analysing, and visualising device data in real time. This integration helps transform raw LoRaWAN traffic into actionable insights, dashboards, and long-term records.

The plugin bridges ChirpStack with Thinger.io through the **Products** feature, enabling automatic device and bucket provisioning, as well as flexible uplink and downlink processing pipelines that can be fully customised to the needs of each project.

---

## Getting Started

> **Prerequisite**
> Devices within the selected ChirpStack Application must be **homogeneous**—same type and model—so that autoprovision can assign the correct product template.

1. **Install the plugin** inside your Thinger.io account.
See the guide [**“How to install a plugin”**](https://marketplace.thinger.io/plugins/managing/) on the Marketplace if you are not familiar with the process.

---

## Plugin Configuration

Open the plugin settings page. In the **Applications** table click **Add +** and fill in:

| Field | Description |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Application Name** | Must match **exactly** the Application ID defined in ChirpStack. The plugin uses this value to correctly associate uplinks and downlinks with the right application. |
| **Device ID Prefix** | Prefix used when generating the device identifier; the Device EUI is appended automatically. Required for autoprovision of devices in Thinger.io. |
| **Access Token** | API token generated in ChirpStack to allow secure communication with the Network Server. This is required to authenticate all requests. |
| **Server URL** | The base URL of your ChirpStack instance. Since ChirpStack is self-hosted, you must provide the public or private endpoint where your server is running. |
| **Port** | The gRPC service port exposed by ChirpStack (default is `8080`). If you are running ChirpStack behind a reverse proxy, make sure this port is accessible or properly forwarded. |
| **Enabled** | Toggles the application integration on or off. |


<p align="center">
<img src="/plugins/chirpstack/assets/add_application.png" onerror="this.src='https://marketplace.thinger.io/plugins/chirpstack/assets/add_application.png';this.onerror='';" alt="Add application modal in ChirpStack Thinger.io Plugin">
</p>

Unlike TTN or LORIOT, ChirpStack must be deployed and managed by the user. The plugin backend communicates with ChirpStack using gRPC (HTTP/2), which provides efficient and real-time interaction but also requires that the gRPC service port is reachable by Thinger.io.

In most cases, you will need to either:

- Expose the correct gRPC port on your ChirpStack instance, or

- Configure your reverse proxy (e.g., Nginx, Traefik, etc.) to support HTTP/2 + grpc_pass.

Since ChirpStack is self-hosted, network accessibility is critical. In our tests we verified connectivity by forwarding the gRPC port from the router directly to the ChirpStack server, ensuring uplinks and downlinks were processed correctly.


## ChirpStack Webhook Configuration

Log in to the ChirpStack Application Server and select the target Application.

Navigate to Integrations → Add Integration and choose the generic HTTP integration (since there is no specific Thinger.io template available yet).

Complete the form with the values provided by the Thinger.io plugin:

<p align="center"> <img src="/plugins/chirpstack/assets/chirpstack_webhook.png" onerror="this.src='https://marketplace.thinger.io/plugins/chirpstack/assets/chirpstack_webhook.png';this.onerror='';" alt="ChirpStack HTTP Webhook Settings for Thinger.io integration"> </p>

| Field | Value |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Event endpoint URL(s)** | Copy the value shown in the plugin under **Endpoint Base URL for Uplinks**. ChirpStack will send all application traffic (uplinks, join events, acknowledgements) to this endpoint. |
| **Headers** | Add a new header with key **Authorization** and value equal to the **ChirpStack API Token** provided in the plugin settings page. |


After saving, uplink traffic will start appearing in the plugin Logs panel.
At this point the devices may still be unrecognised; autoprovision occurs once a matching Device Template is installed or created.

More details on HTTP integrations can be found in the [ChirpStack documentation](https://www.chirpstack.io/docs/).

---

## Device Templates

Device templates define:

* The expected data structure for an specific thinger product
* Uplink / downlink processing scripts
* Default dashboards, device properties and data buckets

### Install a Device Template

Search the Marketplace for a template that matches your device model. If none exists, you can [create your own template](https://docs.thinger.io/products). Notice that, in Thinger.io, a **Product** is a template that defines the structure and behaviour of a device and can also be installed as a plugin.

> **Important**
> Ensure the template **autoprovision prefix** matches the **Device ID Prefix** configured in the plugin.


---

## License

<a href="http://opensource.org/">
<img style="float: right;" width="100px" height="137px" src="/assets/OSI_Standard_Logo_0.svg" onerror="this.src='https://marketplace.thinger.io/assets/OSI_Standard_Logo_0.svg';this.onerror='';">
</a>

This plugin is released under the **MIT License**:

```
Copyright © Thinger.io

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
Binary file added chirpstack/docs/assets/Chirpstack_logo_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added chirpstack/docs/assets/add_application.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added chirpstack/docs/assets/chirpstack-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added chirpstack/docs/assets/chirpstack_webhook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions chirpstack/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

--8<-- "ttn/CHANGELOG.md"
2 changes: 2 additions & 0 deletions chirpstack/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

--8<-- "chirpstack/README.md"
10 changes: 10 additions & 0 deletions chirpstack/docs/plugin_file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
search:
exclude: true
---

# Plugin file

```` json title="Plugin configuration file"
--8<-- "chirpstack/plugin.json"
````
6 changes: 6 additions & 0 deletions chirpstack/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
site_name: plugins/chirpstack

nav:
- "index.md"
- Changelog: "changelog.md"
- Plugin file: "plugin_file.md"
58 changes: 58 additions & 0 deletions chirpstack/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "chirpstack",
"version": "1.1.0",
"description": "Plugin for integrating Thinger.io with ChirpStack LNS",
"author": "Thinger.io",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/thinger-io/plugins.git",
"directory": "chirpstack"
},
"metadata": {
"name": "ChirpStack",
"description": "Chirpstack Integration",
"image": "./docs/assets/Chirpstack_logo_long.png",
"icon": "https://avatars.githubusercontent.com/u/56792266?s=200&v=4"
},
"tokens": {
"chirpstack_plugin": {
"name": "Access from ChirpStack plugin to Thinger.io account",
"allow": {
"Device": {
"*": [
"AccessDeviceResources",
"CreateDeviceProperty",
"ReadDeviceProperty"
]
},
"Plugin": {
"chirpstack": "*"
}
}
},
"chirpstack_plugin_callback": {
"name": "Access from ChirpStack to Uplink callback",
"allow": {
"Plugin": {
"ttn": [
"CallPluginEndpoint"
]
}
}
}
},
"task": {
"type": "docker",
"image": "thinger/chirpstack-plugin",
"port": 3000
},
"interface": {
"main": {
"proxy_to": {
"plugin": "chirpstack",
"port": 3000
}
}
}
}
2 changes: 2 additions & 0 deletions chirpstack/task/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
1 change: 1 addition & 0 deletions chirpstack/task/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
57 changes: 57 additions & 0 deletions chirpstack/task/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM node:22-alpine AS frontend

# install angular cli globally
RUN npm install -g @angular/cli@18.2.3

# app directory
WORKDIR /app

# copy package definitions
COPY ./frontend/package*.json ./

# install dependencies
RUN npm install

# bundle app source
COPY ./frontend/. .

# build app
RUN ng build --configuration=production

FROM node:22-alpine AS backend

# app directory
WORKDIR /app

# copy package definitions
COPY ./backend/package*.json ./

# install dependencies
RUN npm install

# bundle app source
COPY ./backend/tsconfig.json ./
COPY ./backend/src/ ./src/

RUN npm run build

FROM node:22-alpine AS production

# app directory
WORKDIR /app

COPY --from=backend /app/dist/ /app/package*.json /app/
COPY --from=frontend /app/dist/frontend /app/public
COPY ./backend/.env.production ./

RUN ls -l

# change owner of app directory
RUN chown -R node /app

USER node

RUN npm install --omit=dev

EXPOSE 3000
CMD ["npm", "start"]
6 changes: 6 additions & 0 deletions chirpstack/task/backend/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FRONTEND_FILES_PATH=/../../../frontend/dist/frontend/browser
THINGER_HOST=acme.thinger.io
THINGER_PLUGIN=ttn
THINGER_TOKEN_TTN_PLUGIN=
THINGER_TOKEN_TTN_PLUGIN_CALLBACK=
THINGER_USER=
1 change: 1 addition & 0 deletions chirpstack/task/backend/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FRONTEND_FILES_PATH=/app/public/browser
2 changes: 2 additions & 0 deletions chirpstack/task/backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/dist
13 changes: 13 additions & 0 deletions chirpstack/task/backend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";


/** @type {import('eslint').Linter.Config[]} */
export default [
{files: ["**/*.{js,mjs,cjs,ts}"]},
{files: ["**/*.js"], languageOptions: {sourceType: "commonjs"}},
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
Loading
Loading