mirror of
https://github.com/LinoSchmidt/Allnet-Dashboard.git
synced 2026-03-21 02:31:15 +01:00
Docker
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -128,3 +128,5 @@ dist
|
|||||||
.yarn/build-state.yml
|
.yarn/build-state.yml
|
||||||
.yarn/install-state.gz
|
.yarn/install-state.gz
|
||||||
.pnp.*
|
.pnp.*
|
||||||
|
|
||||||
|
influxdb
|
||||||
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
FROM node:latest
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
COPY ./src .
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
CMD ["node", "server.js"]
|
||||||
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
infuxdb-allnet-connector:
|
||||||
|
image: infuxdb-allnet-connector
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: infuxdb-allnet-connector
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 8080:3000
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Berlin
|
||||||
|
- INFLUXDB_URL=http://influxdb:8086
|
||||||
|
- INFLUXDB_TOKEN=${INFLUXDB_TOKEN}
|
||||||
|
- INFLUXDB_ORG=org
|
||||||
|
- INFLUXDB_BUCKET=allnet
|
||||||
|
depends_on:
|
||||||
|
- influxdb
|
||||||
|
|
||||||
|
influxdb:
|
||||||
|
image: influxdb:latest
|
||||||
|
container_name: influxdb
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 8086:8086
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Berlin
|
||||||
|
- DOCKER_INFLUXDB_INIT_MODE=setup
|
||||||
|
- DOCKER_INFLUXDB_INIT_USERNAME=${INFUXDB_USERNAME}
|
||||||
|
- DOCKER_INFLUXDB_INIT_PASSWORD=${INFLUXDB_PASSWORD}
|
||||||
|
- DOCKER_INFLUXDB_INIT_ORG=org
|
||||||
|
- DOCKER_INFLUXDB_INIT_BUCKET=allnet
|
||||||
|
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=${INFLUXDB_TOKEN}
|
||||||
|
volumes:
|
||||||
|
- ./influxdb/data:/var/lib/influxdb2
|
||||||
|
- ./influxdb/config:/etc/influxdb2
|
||||||
|
|
||||||
|
grafana:
|
||||||
|
image: grafana/grafana
|
||||||
|
container_name: grafana
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
environment:
|
||||||
|
- TZ=Europe/Berlin
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
const token = ''
|
const token = process.env.INFLUXDB_TOKEN
|
||||||
const url = ''
|
const url = process.env.INFLUXDB_URL
|
||||||
let org = ''
|
const org = process.env.INFLUXDB_ORG
|
||||||
let bucket = ''
|
const bucket = process.env.INFLUXDB_BUCKET
|
||||||
|
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const {InfluxDB, Point} = require('@influxdata/influxdb-client')
|
const {InfluxDB, Point} = require('@influxdata/influxdb-client')
|
||||||
|
|||||||
Reference in New Issue
Block a user