1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

фикс авторизации9

This commit is contained in:
MoonTestUse1
2025-01-03 22:59:07 +06:00
parent a7531bb1d2
commit f68e46581b
2 changed files with 9 additions and 1 deletions

View File

@@ -1,5 +1,10 @@
from logging.config import fileConfig
import os
import sys
from pathlib import Path
# Добавляем путь к корневой директории проекта
sys.path.append(str(Path(__file__).resolve().parents[1]))
from sqlalchemy import engine_from_config
from sqlalchemy import pool

View File

@@ -8,10 +8,13 @@ done
echo "Database is ready!"
# Устанавливаем переменные окружения
export PYTHONPATH=/app
export DATABASE_URL="postgresql://postgres:postgres123@db:5432/support_db"
# Применяем миграции
echo "Applying database migrations..."
cd /app
export DATABASE_URL="postgresql://postgres:postgres123@db:5432/support_db"
alembic upgrade head
echo "Migrations completed!"