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:
Cole Medin
2025-05-12 07:02:06 -05:00
committed by GitHub
3 changed files with 13 additions and 13 deletions

View File

@@ -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>

View File

@@ -1,3 +1,6 @@
include:
- ./supabase/docker/docker-compose.yml
volumes:
n8n_storage:
ollama_storage:

View File

@@ -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()