From 65e424904a3cd8215c538fa610d34f1a31be3f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Fri, 6 Feb 2026 15:39:32 -0300 Subject: [PATCH] Fix: Add core_config seeding to docker-entrypoint.sh 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. --- docker-entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 8ddae8c..4e00c36 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -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