feat: Add Docker entrypoint script.
This commit is contained in:
@@ -133,13 +133,13 @@ setup_directories() {
|
||||
# Применение миграций и создание суперпользователя
|
||||
run_migrations() {
|
||||
echo "Running migrations for shared apps..."
|
||||
python manage.py migrate_schemas --shared
|
||||
gosu appuser python manage.py migrate_schemas --shared
|
||||
|
||||
echo "Running migrations for tenant schemas..."
|
||||
python manage.py migrate_schemas --tenant
|
||||
gosu appuser python manage.py migrate_schemas --tenant
|
||||
|
||||
echo "Collecting static files..."
|
||||
python manage.py collectstatic --noinput
|
||||
gosu appuser python manage.py collectstatic --noinput
|
||||
|
||||
# Устанавливаем права ПОСЛЕ collectstatic
|
||||
echo "Setting permissions on static files..."
|
||||
@@ -148,7 +148,7 @@ run_migrations() {
|
||||
find "$STATIC_ROOT" -type f -exec chmod 644 {} \; 2>/dev/null || true
|
||||
|
||||
echo "Ensuring public tenant exists..."
|
||||
python /app/docker/create_public_tenant.py
|
||||
gosu appuser python /app/docker/create_public_tenant.py
|
||||
}
|
||||
|
||||
# Создание PlatformAdmin если не существует
|
||||
|
||||
Reference in New Issue
Block a user