mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
фикс авторизации5
This commit is contained in:
20
backend/scripts/init.sh
Normal file
20
backend/scripts/init.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ждем, пока база данных будет доступна
|
||||
echo "Waiting for database..."
|
||||
while ! nc -z db 5432; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "Database is ready!"
|
||||
|
||||
# Применяем миграции
|
||||
echo "Applying database migrations..."
|
||||
cd /app
|
||||
alembic upgrade head
|
||||
|
||||
echo "Migrations completed!"
|
||||
|
||||
# Запускаем приложение
|
||||
echo "Starting application..."
|
||||
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload --workers 1
|
Reference in New Issue
Block a user