feat(db): DATABASE_URL и общий Postgres (Postgres_TG_Bots), БД clinic_tests

Made-with: Cursor
This commit is contained in:
Константин Лебединский
2026-04-24 20:16:22 +05:00
parent c381283ee4
commit 675555531f
8 changed files with 199 additions and 13 deletions
+20
View File
@@ -0,0 +1,20 @@
# Как в HR_TG_Bot: тот же Postgres из Postgres_TG_Bots (docker-compose.dev.yml),
# отдельная база clinic_tests — таблицы приложения не смешиваются с hr_bot_test.
#
# Локально (порт 5432 на хосте, как в Postgres_TG_Bots):
# DATABASE_URL=postgresql://hr_bot_user:hrbot123@localhost:5432/clinic_tests
#
# Backend в Docker рядом с HR: хост — container_name Postgres, порт 5432 внутри сети:
# DATABASE_URL=postgresql://hr_bot_user:hrbot123@hr_postgres_dev:5432/clinic_tests
#
# Базу clinic_tests создают один раз (от суперпользователя контейнера):
# psql "postgresql://hr_bot_user:hrbot123@localhost:5432/postgres" -c "CREATE DATABASE clinic_tests;"
#
# Если DATABASE_URL не задан, используются переменные ниже (устаревший сценарий со своим Postgres на 5433).
# DB_HOST=localhost
# DB_PORT=5432
# DB_NAME=clinic_tests
# DB_USER=developer
# DB_PASSWORD=dev_password
DATABASE_URL=postgresql://hr_bot_user:hrbot123@localhost:5432/clinic_tests