From a207e5a2175e7ebbeb67c4c3f989766a8c403c13 Mon Sep 17 00:00:00 2001 From: ITQ Date: Sat, 22 Nov 2025 01:23:30 +0300 Subject: [PATCH] a --- compose.yaml | 4 +++- infrastructure/configs/postgres/init-db.sql | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 infrastructure/configs/postgres/init-db.sql diff --git a/compose.yaml b/compose.yaml index 7d5074f..af9096d 100644 --- a/compose.yaml +++ b/compose.yaml @@ -160,7 +160,7 @@ services: - path: ./infrastructure/configs/postgres/.env required: false healthcheck: - test: [ "CMD", "pg_isready", "-U", "postgres", "--dbname=postgres" ] + test: [ "CMD", "pg_isready", "-U", "postgres", "--dbname=app" ] interval: 5s timeout: 4s start_period: 5s @@ -261,6 +261,7 @@ services: source: redis_data target: /data + networks: default: driver: bridge @@ -271,6 +272,7 @@ networks: internal: false external: false + volumes: postgres_data: pgadmin_data: diff --git a/infrastructure/configs/postgres/init-db.sql b/infrastructure/configs/postgres/init-db.sql new file mode 100644 index 0000000..f3183a7 --- /dev/null +++ b/infrastructure/configs/postgres/init-db.sql @@ -0,0 +1,5 @@ +CREATE DATABASE app; + +\c app; + +CREATE EXTENSION IF NOT EXISTS vector;