From 6e2a7e33170f6859e4e65fb60e622ebaacaac408 Mon Sep 17 00:00:00 2001 From: Christian Prior-Mamulyan Date: Sun, 27 Apr 2025 23:01:15 +0200 Subject: [PATCH 1/6] fix: clean up startup process by including Supabase compose and improving container handling Extended Description: - Use 'include:' in docker-compose.yml to properly merge Supabase services. - Update start_services.py to pass --profile during container shutdown to prevent orphan containers and leftover networks. - Update README upgrade instructions to reflect these changes. - This fixes the orphan containers, stuck 'localai_default' network, and incomplete Ollama container updates. This change ensures clean startup/shutdown cycles and improves reliability without increasing complexity. --- README.md | 4 ++-- docker-compose.yml | 3 +++ start_services.py | 19 ++++++++----------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7dedebb..bbf43d0 100644 --- a/README.md +++ b/README.md @@ -266,10 +266,10 @@ To update all containers to their latest versions (n8n, Open WebUI, etc.), run t ```bash # Stop all services -docker compose -p localai --profile -f docker-compose.yml -f supabase/docker/docker-compose.yml down +docker compose -p localai -f docker-compose.yml --profile down # Pull latest versions of all containers -docker compose -p localai --profile -f docker-compose.yml -f supabase/docker/docker-compose.yml pull +docker compose -p localai -f docker-compose.yml --profile pull # Start services again with your desired profile python start_services.py --profile diff --git a/docker-compose.yml b/docker-compose.yml index 8ae7585..46f1075 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,6 @@ +include: + - ./supabase/docker/docker-compose.yml + volumes: n8n_storage: ollama_storage: diff --git a/start_services.py b/start_services.py index bac2c1a..22b1f04 100644 --- a/start_services.py +++ b/start_services.py @@ -46,16 +46,13 @@ def prepare_supabase_env(): print("Copying .env in root to .env in supabase/docker...") shutil.copyfile(env_example_path, env_path) -def stop_existing_containers(): - """Stop and remove existing containers for our unified project ('localai').""" +def stop_existing_containers(profile=None): print("Stopping and removing existing containers for the unified project 'localai'...") - run_command([ - "docker", "compose", - "-p", "localai", - "-f", "docker-compose.yml", - "-f", "supabase/docker/docker-compose.yml", - "down" - ]) + cmd = ["docker", "compose", "-p", "localai"] + if profile and profile != "none": + cmd.extend(["--profile", profile]) + cmd.extend(["-f", "docker-compose.yml", "down"]) + run_command(cmd) def start_supabase(): """Start the Supabase services (using its compose file).""" @@ -226,7 +223,7 @@ def main(): generate_searxng_secret_key() check_and_fix_docker_compose_for_searxng() - stop_existing_containers() + stop_existing_containers(args.profile) # Start Supabase first start_supabase() @@ -239,4 +236,4 @@ def main(): start_local_ai(args.profile) if __name__ == "__main__": - main() \ No newline at end of file + main() From 335150ade9c0e898eee6b1d2b5c3204c9419fc94 Mon Sep 17 00:00:00 2001 From: Christian Prior-Mamulyan Date: Sun, 27 Apr 2025 23:10:12 +0200 Subject: [PATCH 2/6] fix(start_services): improve SearXNG container detection and startup clarity - Ensure docker exec does not fail hard when checking uwsgi.ini existence - Improve robustness of first-run detection for SearXNG service - Small cosmetic improvements to startup logs - No functional changes if container and file detection succeeds --- start_services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_services.py b/start_services.py index bac2c1a..9a763f8 100644 --- a/start_services.py +++ b/start_services.py @@ -177,7 +177,7 @@ def check_and_fix_docker_compose_for_searxng(): # Check if uwsgi.ini exists inside the container container_check = subprocess.run( ["docker", "exec", container_name, "sh", "-c", "[ -f /etc/searxng/uwsgi.ini ] && echo 'found' || echo 'not_found'"], - capture_output=True, text=True, check=True + capture_output=True, text=True, check=False ) if "found" in container_check.stdout: From 5645075eb93537347b30241a9e845af4ccae2ee2 Mon Sep 17 00:00:00 2001 From: Leex Date: Fri, 9 May 2025 22:47:49 +0200 Subject: [PATCH 3/6] Added flowise Authentication --- .env.example | 6 ++++++ docker-compose.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.env.example b/.env.example index 0ae8348..45c554e 100644 --- a/.env.example +++ b/.env.example @@ -118,6 +118,12 @@ KONG_HTTPS_PORT=8443 PGRST_DB_SCHEMAS=public,storage,graphql_public +############ +# Flowise - Authentication Configuration for Flowise. +############ +#FLOWISE_USERNAME=your_username +#FLOWISE_PASSWORD=your_password + ############ # Auth - Configuration for the GoTrue authentication server. diff --git a/docker-compose.yml b/docker-compose.yml index 8ae7585..51da5da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,6 +58,8 @@ services: container_name: flowise environment: - PORT=3001 + - FLOWISE_USERNAME=${FLOWISE_USERNAME} + - FLOWISE_PASSWORD=${FLOWISE_PASSWORD} ports: - 3001:3001 extra_hosts: From 5526b993a70931632e16725852a598ac643be08e Mon Sep 17 00:00:00 2001 From: Leex Date: Sun, 11 May 2025 21:57:05 +0200 Subject: [PATCH 4/6] gitignore --- .gitignore | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 903b975..58e7ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,17 @@ volumes/ shared/ supabase/ searxng/uwsgi.ini -searxng/settings.yml \ No newline at end of file +searxng/settings.yml + +# N8N Credentials and Sensitive Data +# Ignore all JSON files in backup directories +n8n/backup/**/*.json +n8n/backup/credentials/ +n8n/backup/workflows/ +n8n/backup/import/credentials/ +n8n/backup/import/workflows/ +!n8n/backup/credentials/.gitkeep +!n8n/backup/workflows/.gitkeep +!n8n/backup/import/credentials/.gitkeep +!n8n/backup/import/workflows/.gitkeep +!n8n/backup/import/workflows/.gitkeep \ No newline at end of file From ec97ef2ee88aa7dfccdaa1e0a7cb9454ec54bd86 Mon Sep 17 00:00:00 2001 From: Leex Date: Sun, 11 May 2025 22:00:29 +0200 Subject: [PATCH 5/6] Delete .gitignore not needed yet --- .gitignore | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 58e7ef8..0000000 --- a/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -.env -.env.test -volumes/ -shared/ -supabase/ -searxng/uwsgi.ini -searxng/settings.yml - -# N8N Credentials and Sensitive Data -# Ignore all JSON files in backup directories -n8n/backup/**/*.json -n8n/backup/credentials/ -n8n/backup/workflows/ -n8n/backup/import/credentials/ -n8n/backup/import/workflows/ -!n8n/backup/credentials/.gitkeep -!n8n/backup/workflows/.gitkeep -!n8n/backup/import/credentials/.gitkeep -!n8n/backup/import/workflows/.gitkeep -!n8n/backup/import/workflows/.gitkeep \ No newline at end of file From 1e0e2c775d7a083e8a38a6bea8cc226ff9065a8c Mon Sep 17 00:00:00 2001 From: Cole Medin Date: Mon, 12 May 2025 07:10:45 -0500 Subject: [PATCH 6/6] Update .env.example Postgres symbols in password warning in .env.example --- .env.example | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 45c554e..9d6f6d7 100644 --- a/.env.example +++ b/.env.example @@ -18,6 +18,9 @@ N8N_USER_MANAGEMENT_JWT_SECRET=even-more-secret # For the JWT Secret and keys, see: https://supabase.com/docs/guides/self-hosting/docker#generate-api-keys # For the other secrets, see: https://supabase.com/docs/guides/self-hosting/docker#update-secrets # You can really decide any value for POOLER_TENANT_ID like 1000. + +# Note that using special symbols (like '%') can complicate things a bit for your Postgres password. +# If you use special symbols in your Postgres password, you must remember to percent-encode your password later if using the Postgres connection string, for example, postgresql://postgres.projectref:p%3Dword@aws-0-us-east-1.pooler.supabase.com:6543/postgres ############ POSTGRES_PASSWORD=your-super-secret-and-long-postgres-password @@ -198,4 +201,4 @@ DOCKER_SOCKET_LOCATION=/var/run/docker.sock # Google Cloud Project details GOOGLE_PROJECT_ID=GOOGLE_PROJECT_ID -GOOGLE_PROJECT_NUMBER=GOOGLE_PROJECT_NUMBER \ No newline at end of file +GOOGLE_PROJECT_NUMBER=GOOGLE_PROJECT_NUMBER