mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-08 06:43:22 +00:00
Merge pull request #51 from cprima-forks/fix/startup-include-supabase-compose
fix(start_services): clean up startup process by including Supabase compose and improving container handling
This commit is contained in:
@@ -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 <your-profile> -f docker-compose.yml -f supabase/docker/docker-compose.yml down
|
||||
docker compose -p localai -f docker-compose.yml --profile <your-profile> down
|
||||
|
||||
# Pull latest versions of all containers
|
||||
docker compose -p localai --profile <your-profile> -f docker-compose.yml -f supabase/docker/docker-compose.yml pull
|
||||
docker compose -p localai -f docker-compose.yml --profile <your-profile> pull
|
||||
|
||||
# Start services again with your desired profile
|
||||
python start_services.py --profile <your-profile>
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
include:
|
||||
- ./supabase/docker/docker-compose.yml
|
||||
|
||||
volumes:
|
||||
n8n_storage:
|
||||
ollama_storage:
|
||||
|
||||
@@ -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()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user