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
|
from logging.config import fileConfig
|
||||||
import os
|
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 engine_from_config
|
||||||
from sqlalchemy import pool
|
from sqlalchemy import pool
|
||||||
|
|||||||
@@ -8,10 +8,13 @@ done
|
|||||||
|
|
||||||
echo "Database is ready!"
|
echo "Database is ready!"
|
||||||
|
|
||||||
|
# Устанавливаем переменные окружения
|
||||||
|
export PYTHONPATH=/app
|
||||||
|
export DATABASE_URL="postgresql://postgres:postgres123@db:5432/support_db"
|
||||||
|
|
||||||
# Применяем миграции
|
# Применяем миграции
|
||||||
echo "Applying database migrations..."
|
echo "Applying database migrations..."
|
||||||
cd /app
|
cd /app
|
||||||
export DATABASE_URL="postgresql://postgres:postgres123@db:5432/support_db"
|
|
||||||
alembic upgrade head
|
alembic upgrade head
|
||||||
|
|
||||||
echo "Migrations completed!"
|
echo "Migrations completed!"
|
||||||
|
|||||||
Reference in New Issue
Block a user