Skip to content

Commit 4dfa028

Browse files
Merge branch 'master' into copilot/update-repo-documentation
2 parents 988d5e1 + dabb491 commit 4dfa028

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ This plugin allows you to use MongoDB as a data source in Grafana. It works by r
1919
- Table panel support for aggregated data
2020
- Auto-bucketing support with `$bucketAuto` and `$dateBucketCount`
2121

22-
---
22+
- **Grafana**: version 3.x.x or higher
23+
- **MongoDB**: version 3.4.x or higher
24+
- **Node.js**: version 6.10.0 or higher (for running the proxy server)
2325

2426
## Requirements
2527

@@ -46,6 +48,8 @@ cp -r dist /usr/local/var/lib/grafana/plugins/mongodb-grafana
4648
sudo systemctl restart grafana-server # Linux
4749
brew services restart grafana # macOS
4850
```
51+
# Local MongoDB
52+
mongodb://localhost:27017
4953

5054
### 2. Install and start the MongoDB proxy server
5155

@@ -208,11 +212,26 @@ Fork maintained by [run-as-daemon.ru](https://run-as-daemon.ru)
208212

209213
**Made with ❤️ by the MongoDB + Grafana community and [run-as-daemon.ru](https://run-as-daemon.ru)**
210214

215+
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
211216

217+
---
212218

219+
## License
213220

221+
ISC License
214222

223+
Original work by James Osgood
224+
Fork maintained by [run-as-daemon.ru](https://run-as-daemon.ru)
225+
226+
---
215227

228+
## Links
216229

230+
- [Original Repository](https://github.com/JamesOsgood/mongodb-grafana)
231+
- [Grafana Documentation](https://grafana.com/docs/)
232+
- [MongoDB Aggregation Pipeline](https://docs.mongodb.com/manual/core/aggregation-pipeline/)
233+
- [run-as-daemon Services](https://run-as-daemon.ru)
217234

235+
---
218236

237+
**Made with ❤️ by the MongoDB-Grafana community and [run-as-daemon.ru](https://run-as-daemon.ru)**

examples/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Builder stage - build the Grafana plugin
2+
FROM node:16-alpine AS builder
3+
4+
WORKDIR /app
5+
6+
# Copy package files
7+
COPY package*.json ./
8+
9+
# Install dependencies
10+
RUN npm install
11+
12+
# Copy source files
13+
COPY . .
14+
15+
# Build the plugin
16+
RUN npm run build
17+
18+
# Runtime stage - run the MongoDB proxy server
19+
FROM node:16-alpine
20+
21+
WORKDIR /app
22+
23+
# Copy built files from builder
24+
COPY --from=builder /app/dist/server ./server
25+
COPY --from=builder /app/node_modules ./node_modules
26+
COPY --from=builder /app/package*.json ./
27+
28+
WORKDIR /app/server
29+
30+
# Expose proxy server port
31+
EXPOSE 3333
32+
33+
# Start the proxy server
34+
CMD ["node", "mongodb-proxy.js"]

0 commit comments

Comments
 (0)