From e664c0fc6e758a66c0d1955b2f364f5588d4cbed Mon Sep 17 00:00:00 2001 From: Felipe Date: Wed, 9 Sep 2026 22:21:34 -0300 Subject: [PATCH] Add postgres service to the dashboard compose stack and point the API at it Claude-Session: https://claude.ai/code/session_012gos1qbDnSzz7Qjia9yq5P --- cli/canyonos/dashboard.compose.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cli/canyonos/dashboard.compose.yml b/cli/canyonos/dashboard.compose.yml index 0effbac..e6691ab 100644 --- a/cli/canyonos/dashboard.compose.yml +++ b/cli/canyonos/dashboard.compose.yml @@ -1,6 +1,22 @@ services: + postgres: + image: postgres:17-alpine + environment: + POSTGRES_DB: canyonos + POSTGRES_USER: canyonos + POSTGRES_PASSWORD: canyonos + volumes: + - postgres-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U canyonos -d canyonos"] + interval: 3s + timeout: 3s + retries: 20 api: image: ${CANYONOS_API_IMAGE} + depends_on: + postgres: + condition: service_healthy # Published on all interfaces (not just 127.0.0.1) so a GC container can # actually reach this via host.docker.internal -- Docker's host-gateway # route doesn't reach ports bound to loopback only, so a 127.0.0.1 bind @@ -10,6 +26,7 @@ services: ports: - "3000:3000" environment: + DATABASE_URL: postgres://canyonos:canyonos@postgres:5432/canyonos JWT_SECRET: ${CANYONOS_JWT_SECRET} CANYONOS_DISABLE_AUTH: "true" CANYONOS_REDIS_HOST: ${CANYONOS_REDIS_HOST} @@ -24,3 +41,5 @@ services: condition: service_healthy ports: - "127.0.0.1:${CANYONOS_WEB_PORT}:8080" +volumes: + postgres-data: