Laravel container restarts because its SQLite database path is invalid
The application is not running: its container keeps exiting. Nothing answered on any published port because the process never stays up. Read the container output — the reason it exits is there. | The application is restarting, not running. Docker reports app (Restarting (1) 28 seconds ago). Nothing answered on any published port because the process keeps exiting. Read the container output with container_service_logs; the reason it exits is there. | The application is up, but a service it depen…
Why it happens
The Laravel app exits during startup while preparing SQLite. Its configured path resolves to a nested location such as /app/database/app/database/database.sqlite, which cannot be created. The container then enters a restart loop, so port 8000 never becomes reachable.
What the log looks like
Container output at the point of failure:app-1 | SQLite Database Path: /app/database/app/database/database.sqliteapp-1 | touch(): Unable to create file /app/database/app/database/database.sqliteapp-1 | AppServiceProvider.php:167...Health check: http://[ip]:8000/ did not answerDocker reports app (Restarting (1))