commit f356f92a1f53b051b52da47aa636a859d31de8de Author: Florian Weber Date: Sat Sep 9 11:35:39 2023 +0200 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3af0ccb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/data diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..590b11a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,39 @@ +version: '3' + +services: + influxdb: + image: influxdb:2.7-alpine + env_file: + - ./influxv2.env + volumes: + # Mount for influxdb data directory and configuration + - /DockerDataPool/solarCtrl/influxDB:/var/lib/influxdb2:rw + - ./influxDbConfig.yml:/etc/influxdb2/config.yml + ports: + - 8080:8086 + networks: + - solarctrlInternal +# telegraf: +# image: telegraf:1.27-alpine +# depends_on: +# - influxdb +# volumes: +# # Mount for telegraf config +# - ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro +# env_file: +# - ./influxv2.env + mosquitto: + image: eclipse-mosquitto:2.0.17 + restart: always + volumes: + - ./mosquitto.conf:/mosquitto/config/mosquitto.conf + - ./mosquitto.passwd:/mosquitto/config/mosquitto.passwd + - ./data/mosquitto/data:/mosquitto/data + - ./data/mosquitto/log:/mosquitto/log + ports: + - 1883:1883 + networks: + - solarctrlInternal +networks: + solarctrlInternal: + diff --git a/influxDbConfig.yml b/influxDbConfig.yml new file mode 100644 index 0000000..ea293b5 --- /dev/null +++ b/influxDbConfig.yml @@ -0,0 +1,70 @@ +assets-path: "" +bolt-path: /var/lib/influxdb2/influxd.bolt +e2e-testing: false +engine-path: /var/lib/influxdb2/engine +feature-flags: {} +flux-log-enabled: false +hardening-enabled: false +http-bind-address: :8086 +http-idle-timeout: 3m0s +http-read-header-timeout: 10s +http-read-timeout: 0s +http-write-timeout: 0s +influxql-max-select-buckets: 0 +influxql-max-select-point: 0 +influxql-max-select-series: 0 +instance-id: "" +key-name: "" +log-level: info +metrics-disabled: false +nats-max-payload-bytes: 0 +nats-port: 4222 +no-tasks: false +pprof-disabled: false +query-concurrency: 1024 +query-initial-memory-bytes: 0 +query-max-memory-bytes: 0 +query-memory-bytes: 0 +query-queue-size: 1024 +reporting-disabled: false +secret-store: bolt +session-length: 60 +session-renew-disabled: false +sqlite-path: "" +storage-cache-max-memory-size: 1073741824 +storage-cache-snapshot-memory-size: 26214400 +storage-cache-snapshot-write-cold-duration: 10m0s +storage-compact-full-write-cold-duration: 4h0m0s +storage-compact-throughput-burst: 50331648 +storage-max-concurrent-compactions: 0 +storage-max-index-log-file-size: 1048576 +storage-no-validate-field-size: false +storage-retention-check-interval: 30m0s +storage-series-file-max-concurrent-snapshot-compactions: 0 +storage-series-id-set-cache-size: 0 +storage-shard-precreator-advance-period: 30m0s +storage-shard-precreator-check-interval: 10m0s +storage-tsm-use-madv-willneed: false +storage-validate-keys: false +storage-wal-fsync-delay: 0s +storage-wal-max-concurrent-writes: 0 +storage-wal-max-write-delay: 10m0s +storage-write-timeout: 10s +store: disk +testing-always-allow-setup: false +tls-cert: "" +tls-key: "" +tls-min-version: "1.2" +tls-strict-ciphers: false +tracing-type: "" +ui-disabled: false +vault-addr: "" +vault-cacert: "" +vault-capath: "" +vault-client-cert: "" +vault-client-key: "" +vault-client-timeout: 0s +vault-max-retries: 0 +vault-skip-verify: false +vault-tls-server-name: "" +vault-token: "" \ No newline at end of file diff --git a/influxv2.env b/influxv2.env new file mode 100644 index 0000000..d6b3e6e --- /dev/null +++ b/influxv2.env @@ -0,0 +1,6 @@ +DOCKER_INFLUXDB_INIT_MODE=setup +DOCKER_INFLUXDB_INIT_USERNAME=heatCtrl +DOCKER_INFLUXDB_INIT_PASSWORD=637013password +DOCKER_INFLUXDB_INIT_ORG=heatctrlOrg +DOCKER_INFLUXDB_INIT_BUCKET=measurements +DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=637013token \ No newline at end of file diff --git a/mosquitto.conf b/mosquitto.conf new file mode 100644 index 0000000..eed9785 --- /dev/null +++ b/mosquitto.conf @@ -0,0 +1,9 @@ +persistence true +persistence_location /mosquitto/data/ + +log_dest file /mosquitto/log/mosquitto.log +log_dest stdout + +password_file /mosquitto/config/mosquitto.passwd +allow_anonymous false +listener 1883 \ No newline at end of file diff --git a/mosquitto.env b/mosquitto.env new file mode 100644 index 0000000..9a7d685 --- /dev/null +++ b/mosquitto.env @@ -0,0 +1,7 @@ +# Config File for Mosquitto MQTT Application +# Port Configuration Mosquitto MQTT +MQTT_PORT=1883 +MQTT_TLS_PORT=8883 + +# Timezone +TZ="Europe/Berlin" \ No newline at end of file diff --git a/mosquitto.passwd b/mosquitto.passwd new file mode 100644 index 0000000..115a14e --- /dev/null +++ b/mosquitto.passwd @@ -0,0 +1 @@ +heatCtrl:$7$101$Q0URo3gi5IgUwTLB$2M0eLGYBq4xP/RD1p3SC3IBJQs2hkEOH7HNm/DNt2/Zq+qmDMVNUic0Mom34sgXSLYKqmXfLQhVi8TjO8Tcu0Q==