uses sockets for db connect

This commit is contained in:
2026-06-25 09:12:08 +00:00
parent e2cc7baf3e
commit 2759e69c2c
+8 -2
View File
@@ -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: