From 75ba80a3c3ac9d91f214b0d0567ddb5a13b84984 Mon Sep 17 00:00:00 2001 From: Darren <27513732@qq.com> Date: Wed, 12 Jun 2024 11:33:53 +0800 Subject: [PATCH] improve nodered --- apps/nodered/.env | 9 ++++++++- apps/nodered/docker-compose.yml | 4 +--- apps/nodered/src/my_flows.json | 0 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 apps/nodered/src/my_flows.json diff --git a/apps/nodered/.env b/apps/nodered/.env index 5ae07cef6..c0dd77bbd 100644 --- a/apps/nodered/.env +++ b/apps/nodered/.env @@ -10,5 +10,12 @@ W9_URL=appname.example.com W9_NETWORK=websoft9 #### --------------------------------------------------------------------------------------- #### +# Below is environments of Node-Red # env docs: https://nodered.org/docs/getting-started/docker#startup -# config_file:/data/settings.js \ No newline at end of file +# config_file:/data/settings.js + +TZ=Europe/Amsterdam +NODE_OPTIONS=--max_old_space_size=128 +NODE_RED_ENABLE_SAFE_MODE=false +NODE_RED_ENABLE_PROJECTS=false +#FLOWS=my_flows.json \ No newline at end of file diff --git a/apps/nodered/docker-compose.yml b/apps/nodered/docker-compose.yml index af8800eca..0295733b4 100644 --- a/apps/nodered/docker-compose.yml +++ b/apps/nodered/docker-compose.yml @@ -9,11 +9,9 @@ services: container_name: ${W9_ID} ports: - ${W9_HTTP_PORT_SET}:1880 - environment: - - TZ=Europe/Amsterdam - - NODE_OPTIONS=--max_old_space_size=128 volumes: - nodered_data:/data + #- ./src/my_flows.json:/data/my_flows.json env_file: .env restart: unless-stopped diff --git a/apps/nodered/src/my_flows.json b/apps/nodered/src/my_flows.json new file mode 100644 index 000000000..e69de29bb