From 8745776342e5d5379846f2126a68b037b4e72f64 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 23 Jun 2023 23:03:53 +0100 Subject: [PATCH] add env variables --- docker/.env.example | 1 + docker/docker-compose.yml | 1 + packages/components/.env.example | 1 - packages/components/README.md | 8 -------- packages/server/.env.example | 1 + packages/server/README.md | 4 ++++ packages/server/src/commands/start.ts | 2 ++ 7 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 packages/components/.env.example diff --git a/docker/.env.example b/docker/.env.example index e313316d694..3d524e5c795 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,5 +1,6 @@ PORT=3000 # FLOWISE_USERNAME=user # FLOWISE_PASSWORD=1234 +# DEBUG=true # DATABASE_PATH=/your_database_path/.flowise # EXECUTION_MODE=child or main \ No newline at end of file diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 0bb680972fc..7ab43142920 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -10,6 +10,7 @@ services: - FLOWISE_PASSWORD=${FLOWISE_PASSWORD} - DATABASE_PATH=${DATABASE_PATH} - EXECUTION_MODE=${EXECUTION_MODE} + - DEBUG=${DEBUG} ports: - '${PORT}:${PORT}' volumes: diff --git a/packages/components/.env.example b/packages/components/.env.example deleted file mode 100644 index 352bc6cb0a8..00000000000 --- a/packages/components/.env.example +++ /dev/null @@ -1 +0,0 @@ -DEBUG=true \ No newline at end of file diff --git a/packages/components/README.md b/packages/components/README.md index 8014661e146..5b564beccbf 100644 --- a/packages/components/README.md +++ b/packages/components/README.md @@ -12,14 +12,6 @@ Install: npm i flowise-components ``` -## Debug - -To view all the logs, create an `.env` file and add: - -``` -DEBUG=true -``` - ## License Source code in this repository is made available under the [MIT License](https://github.com/FlowiseAI/Flowise/blob/master/LICENSE.md). diff --git a/packages/server/.env.example b/packages/server/.env.example index e313316d694..3d524e5c795 100644 --- a/packages/server/.env.example +++ b/packages/server/.env.example @@ -1,5 +1,6 @@ PORT=3000 # FLOWISE_USERNAME=user # FLOWISE_PASSWORD=1234 +# DEBUG=true # DATABASE_PATH=/your_database_path/.flowise # EXECUTION_MODE=child or main \ No newline at end of file diff --git a/packages/server/README.md b/packages/server/README.md index e4d1e4395e9..74ba9a25865 100644 --- a/packages/server/README.md +++ b/packages/server/README.md @@ -29,6 +29,10 @@ FLOWISE_USERNAME=user FLOWISE_PASSWORD=1234 ``` +## 🔎 Debugging + +You can set `DEBUG=true` to the `.env` file. Refer [here](https://docs.flowiseai.com/environment-variables) for full list of env variables + ## 📖 Documentation [Flowise Docs](https://docs.flowiseai.com/) diff --git a/packages/server/src/commands/start.ts b/packages/server/src/commands/start.ts index 9066f1cf5ec..0f64322bd83 100644 --- a/packages/server/src/commands/start.ts +++ b/packages/server/src/commands/start.ts @@ -18,6 +18,7 @@ export default class Start extends Command { FLOWISE_USERNAME: Flags.string(), FLOWISE_PASSWORD: Flags.string(), PORT: Flags.string(), + DEBUG: Flags.string(), DATABASE_PATH: Flags.string(), EXECUTION_MODE: Flags.string() } @@ -56,6 +57,7 @@ export default class Start extends Command { if (flags.PORT) process.env.PORT = flags.PORT if (flags.DATABASE_PATH) process.env.DATABASE_PATH = flags.DATABASE_PATH if (flags.EXECUTION_MODE) process.env.EXECUTION_MODE = flags.EXECUTION_MODE + if (flags.DEBUG) process.env.DEBUG = flags.DEBUG await (async () => { try {