mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
фикс авторизации9
This commit is contained in:
@@ -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
|
||||
|
@@ -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!"
|
||||
|
Reference in New Issue
Block a user