From 2759e69c2cd3b662017ddd94912b714fbc5a2e7e Mon Sep 17 00:00:00 2001 From: kfj001 Date: Thu, 25 Jun 2026 09:12:08 +0000 Subject: [PATCH] uses sockets for db connect --- docker-compose.test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index f848f11..81e33a8 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -10,6 +10,7 @@ services: POSTGRES_PASSWORD: postgres volumes: - pgdata:/var/lib/postgresql/data + - pgsocket:/var/run/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s @@ -22,8 +23,12 @@ services: image: truenas.local:35000/kmtnflower-api:latest restart: unless-stopped environment: - KMTN_DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/kmountain - KMTN_CORS_ORIGINS: '["http://localhost:4200", "http://localhost"]' + KMTN_DATABASE_URL: postgresql+asyncpg://postgres:postgres@/kmountain?host=/var/run/postgresql + KMTN_CORS_ORIGINS: '["http://truenas.local:4200", "http://truenas.local"]' + KMTN_ADMIN_USERNAME: admin + KMTN_ADMIN_PASSWORD: 123 + volumes: + - pgsocket:/var/run/postgresql ports: - "8000:8000" depends_on: @@ -43,3 +48,4 @@ services: volumes: pgdata: + pgsocket: