Compare commits

..

1 Commits

Author SHA1 Message Date
e3ef9e3827 fix(deploy): add DATABASE_URL and openbrain network to orchestrator and synapse
All checks were successful
ci/woodpecker/push/ci Infra-only change: no app code affected, CI not required
Orchestrator was crashing with PrismaClientInitializationError because DATABASE_URL
was never added to docker-compose.swarm.portainer.yml when Prisma was integrated.
Synapse was failing because homeserver.yaml pointed to 'postgres' hostname instead
of the actual openbrain_brain-db service.

Changes:
- Add DATABASE_URL env var to orchestrator service
- Add openbrain_brain-internal network to orchestrator service
- Add openbrain_brain-internal network to synapse service

Note: homeserver.yaml /opt/mosaic/synapse/homeserver.yaml was also patched
directly on the server (host: postgres → host: openbrain_brain-db).
2026-03-08 10:36:41 -05:00
3 changed files with 5 additions and 36 deletions

View File

@@ -4,7 +4,6 @@ import { Outfit, Fira_Code } from "next/font/google";
import { AuthProvider } from "@/lib/auth/auth-context";
import { ErrorBoundary } from "@/components/error-boundary";
import { ThemeProvider } from "@/providers/ThemeProvider";
import { ReactQueryProvider } from "@/providers/ReactQueryProvider";
import "./globals.css";
export const dynamic = "force-dynamic";
@@ -57,11 +56,9 @@ export default function RootLayout({ children }: { children: ReactNode }): React
</head>
<body>
<ThemeProvider>
<ReactQueryProvider>
<ErrorBoundary>
<AuthProvider>{children}</AuthProvider>
</ErrorBoundary>
</ReactQueryProvider>
<ErrorBoundary>
<AuthProvider>{children}</AuthProvider>
</ErrorBoundary>
</ThemeProvider>
</body>
</html>

View File

@@ -1,28 +0,0 @@
"use client";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { useState, type ReactNode } from "react";
interface ReactQueryProviderProps {
children: ReactNode;
}
export function ReactQueryProvider({ children }: ReactQueryProviderProps): React.JSX.Element {
// Create a stable QueryClient per component mount (one per app session)
const [queryClient] = useState(
() =>
new QueryClient({
defaultOptions: {
queries: {
// Don't refetch on window focus in a dashboard context
refetchOnWindowFocus: false,
// Stale time of 30s — short enough for live data, avoids hammering
staleTime: 30_000,
retry: 1,
},
},
})
);
return <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>;
}

View File

@@ -333,7 +333,7 @@ services:
start_period: 40s
networks:
- internal
- openbrain-brain-internal
- openbrain_brain-internal
cap_drop:
- ALL
cap_add:
@@ -406,7 +406,7 @@ services:
networks:
- internal
- traefik-public
- openbrain-brain-internal
- openbrain_brain-internal
deploy:
restart_policy:
condition: on-failure