Fix: Add core_config seeding to docker-entrypoint.sh
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m59s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m59s
Ensures that essential configuration (locale, timezone, etc.) is populated in the database on container startup. This prevents the application from crashing (showing 500 error page) when the core_config table is empty.
This commit is contained in:
@@ -95,6 +95,10 @@ else
|
||||
echo "⏩ Já existem usuários no banco ($USER_COUNT). Pulando Seed para evitar duplicidade."
|
||||
fi
|
||||
|
||||
# Garantir Configuração Core (Evita erro 500)
|
||||
echo "⚙️ Configurando core_config..."
|
||||
php artisan tinker --execute="try{DB::table('core_config')->insertOrIgnore([['code'=>'general.general.locale_settings.locale','value'=>'pt_BR'],['code'=>'general.general.locale_settings.timezone','value'=>'America/Sao_Paulo'],['code'=>'general.general.locale_settings.weight_unit','value'=>'kg'],['code'=>'general.content.footer.footer_content','value'=>'Powered by Growup']]);}catch(\Exception \$e){}"
|
||||
|
||||
# 7. OTIMIZAÇÃO FINAL
|
||||
echo "⚡ Otimizando..."
|
||||
php artisan optimize
|
||||
|
||||
Reference in New Issue
Block a user