From e3ef9e38273b43e5cfeb259d02447915c20268b3 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 8 Mar 2026 10:36:41 -0500 Subject: [PATCH] fix(deploy): add DATABASE_URL and openbrain network to orchestrator and synapse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- docker-compose.swarm.portainer.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-compose.swarm.portainer.yml b/docker-compose.swarm.portainer.yml index b17abe7..080c0c1 100644 --- a/docker-compose.swarm.portainer.yml +++ b/docker-compose.swarm.portainer.yml @@ -316,6 +316,8 @@ services: SANDBOX_ENABLED: "true" # API key for authenticating requests from the web proxy ORCHESTRATOR_API_KEY: ${ORCHESTRATOR_API_KEY} + # Prisma database connection (uses the shared openbrain postgres) + DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@openbrain_brain-db:5432/${POSTGRES_DB:-mosaic} volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - orchestrator_workspace:/workspace @@ -331,6 +333,7 @@ services: start_period: 40s networks: - internal + - openbrain_brain-internal cap_drop: - ALL cap_add: @@ -403,6 +406,7 @@ services: networks: - internal - traefik-public + - openbrain_brain-internal deploy: restart_policy: condition: on-failure