From fd7ef73a477f4b6079010393c26c2dae854d50e5 Mon Sep 17 00:00:00 2001 From: Dobromir Popov ONE Date: Mon, 15 May 2023 10:58:49 +0300 Subject: [PATCH] merge env. using existing mqtt --- .env | 7 +++++++ .gitignore | 5 +++-- docker-compose.yml | 21 ++++++++++----------- 3 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..389fbbe --- /dev/null +++ b/.env @@ -0,0 +1,7 @@ +# .env +# Replace with the correct values +DB_HOST=mariadb +DB_USER=mariadb +DB_PASS=mariadb +DB_PORT=3306 +DB_NAME=mariadb \ No newline at end of file diff --git a/.gitignore b/.gitignore index b01d11f..3f0e36a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -/node_modules +node_modules/ /.vscode access.log db/documents.db vendor -/.vs +.vs/ + diff --git a/docker-compose.yml b/docker-compose.yml index a6ccde3..3f20685 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,6 @@ version: '3.3' services: node-app: build: . - command: npm run start:debug environment: - DATABASE_HOST=node-mysql - DATABASE_NAME=iot @@ -11,13 +10,13 @@ services: - DATABASE_PASS=mitko2021 - GARDEN_IP=0.0.0.0 # - GARDEN_IP=192.168.0.100 - - MQTT_HOST=192.168.0.10 + - MQTT_HOST=node-mqtt - MQTT_PORT_HTTP=1883 - MQTT_PORT_HTTPS=8444 - MQTT_ESP_NAME=Garden depends_on: - node-mysql - #- node-mqtt + - node-mqtt restart: always ports: - 2081:2080 @@ -33,13 +32,13 @@ services: volumes: - iotdbdata:/var/lib/mysql # for mitko:mqtt - # node-mqtt: - # image: eclipse-mosquitto - # command: mosquitto -c /mosquitto-no-auth.conf - # hostname: node-mqtt - # ports: - # - 1885:1883 - # - 10883:1883 - # restart: always + node-mqtt: + image: eclipse-mosquitto + command: mosquitto -c /mosquitto-no-auth.conf + hostname: node-mqtt + ports: + - 1885:1883 + - 10883:1883 + restart: always volumes: iotdbdata: \ No newline at end of file