Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:alpine AS builder

WORKDIR /app

COPY package.json package-lock.json ./

RUN npm install -g npm@latest && npm ci

COPY . .
RUN npm run build

FROM node:alpine

WORKDIR /app

COPY --from=builder /app/node_modules ./node_modules

COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package.json /app/server.js ./

EXPOSE 8080

ENV API_URL=""

CMD ["sh", "-c", "node server.js --port 8080 ${API_URL:+--meshtastic-api-url $API_URL}"]
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ sudo systemctl status meshtxt.service

> Note: Make sure to update the usernames in the service file if needed.

**Running in Docker**

```
docker build -t meshtxt .
docker run --name meshtxt -e API_URL="https://yourmashtasticnode.domain.tld" -d -p 8080:8080 meshtxt
```

## TODO

- Add new nodes to node list when a new node is discovered
Expand Down