[{"data":1,"prerenderedAt":694},["ShallowReactive",2],{"navigation":3,"/docs/guide/using-healthchecks-with-laravel":221,"/docs/guide/using-healthchecks-with-laravel-surround":689},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","/docs","docs",[9,12,56,85,132,153,178,195,208],{"title":10,"path":6,"stem":11},"","docs/index",{"title":13,"path":14,"stem":15,"children":16,"icon":55},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[17,19,23,27,31,35,39,43,47,51],{"title":18,"path":14,"stem":15},"Introduction",{"title":20,"path":21,"stem":22},"Container Basics","/docs/getting-started/container-basics","docs/1.getting-started/2.container-basics",{"title":24,"path":25,"stem":26},"Installation","/docs/getting-started/installation","docs/1.getting-started/3.installation",{"title":28,"path":29,"stem":30},"These Images vs Others","/docs/getting-started/these-images-vs-others","docs/1.getting-started/4.these-images-vs-others",{"title":32,"path":33,"stem":34},"Choosing an Image","/docs/getting-started/choosing-an-image","docs/1.getting-started/5.choosing-an-image",{"title":36,"path":37,"stem":38},"Default Configurations","/docs/getting-started/default-configurations","docs/1.getting-started/6.default-configurations",{"title":40,"path":41,"stem":42},"Upgrade Guide","/docs/getting-started/upgrade-guide","docs/1.getting-started/7.upgrade-guide",{"title":44,"path":45,"stem":46},"Changelog","/docs/getting-started/changelog","docs/1.getting-started/8.changelog",{"title":48,"path":49,"stem":50},"About","/docs/getting-started/about","docs/1.getting-started/9.about",{"title":52,"path":53,"stem":54},"Contributing","/docs/getting-started/contributing","docs/1.getting-started/99.contributing",false,{"title":57,"path":58,"stem":59,"children":60,"page":55},"Image Variations","/docs/image-variations","docs/2.image-variations",[61,65,69,73,77,81],{"title":62,"path":63,"stem":64},"CLI","/docs/image-variations/cli","docs/2.image-variations/cli",{"title":66,"path":67,"stem":68},"FPM","/docs/image-variations/fpm","docs/2.image-variations/fpm",{"title":70,"path":71,"stem":72},"FPM-Apache","/docs/image-variations/fpm-apache","docs/2.image-variations/fpm-apache",{"title":74,"path":75,"stem":76},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/2.image-variations/fpm-nginx",{"title":78,"path":79,"stem":80},"FrankenPHP","/docs/image-variations/frankenphp","docs/2.image-variations/frankenphp",{"title":82,"path":83,"stem":84},"Unit (Deprecated)","/docs/image-variations/unit","docs/2.image-variations/unit",{"title":86,"path":87,"stem":88,"children":89,"page":55},"Framework Guides","/docs/framework-guides","docs/3.framework-guides",[90,123],{"title":91,"icon":55,"defaultOpen":55,"path":92,"stem":93,"children":94,"page":55},"Laravel","/docs/framework-guides/laravel","docs/3.framework-guides/1.laravel",[95,99,103,107,111,115,119],{"title":96,"path":97,"stem":98},"Automations","/docs/framework-guides/laravel/automations","docs/3.framework-guides/1.laravel/1.automations",{"title":100,"path":101,"stem":102},"Task Scheduler","/docs/framework-guides/laravel/task-scheduler","docs/3.framework-guides/1.laravel/2.task-scheduler",{"title":104,"path":105,"stem":106},"Queue","/docs/framework-guides/laravel/queue","docs/3.framework-guides/1.laravel/3.queue",{"title":108,"path":109,"stem":110},"Horizon","/docs/framework-guides/laravel/horizon","docs/3.framework-guides/1.laravel/4.horizon",{"title":112,"path":113,"stem":114},"Reverb","/docs/framework-guides/laravel/reverb","docs/3.framework-guides/1.laravel/4.reverb",{"title":116,"path":117,"stem":118},"Nightwatch","/docs/framework-guides/laravel/nightwatch","docs/3.framework-guides/1.laravel/5.nightwatch",{"title":120,"path":121,"stem":122},"Octane","/docs/framework-guides/laravel/octane","docs/3.framework-guides/1.laravel/octane",{"title":124,"icon":55,"defaultOpen":55,"path":125,"stem":126,"children":127,"page":55},"WordPress","/docs/framework-guides/wordpress","docs/3.framework-guides/2.wordpress",[128],{"title":129,"path":130,"stem":131},"Using Docker with WordPress","/docs/framework-guides/wordpress/using-wordpress-with-docker","docs/3.framework-guides/2.wordpress/4.using-wordpress-with-docker",{"title":133,"path":134,"stem":135,"children":136,"page":55},"Deployment And Production","/docs/deployment-and-production","docs/4.deployment-and-production",[137,141,145,149],{"title":138,"path":139,"stem":140},"Development to Production","/docs/deployment-and-production/development-to-production","docs/4.deployment-and-production/2.development-to-production",{"title":142,"path":143,"stem":144},"Packaging Your App for Deployment","/docs/deployment-and-production/packaging-your-app-for-deployment","docs/4.deployment-and-production/3.packaging-your-app-for-deployment",{"title":146,"path":147,"stem":148},"Configuring SSL","/docs/deployment-and-production/configuring-ssl","docs/4.deployment-and-production/4.configuring-ssl",{"title":150,"path":151,"stem":152},"Choosing a Host","/docs/deployment-and-production/choosing-a-host","docs/4.deployment-and-production/5.choosing-a-host",{"title":154,"icon":55,"defaultOpen":55,"path":155,"stem":156,"children":157,"page":55},"Advanced Guides","/docs/guide","docs/5.guide",[158,162,166,170,174],{"title":159,"path":160,"stem":161},"Migrating from official PHP images","/docs/guide/migrating-from-official-php-images","docs/5.guide/1.migrating-from-official-php-images",{"title":163,"path":164,"stem":165},"Using Healthchecks With Laravel","/docs/guide/using-healthchecks-with-laravel","docs/5.guide/2.using-healthchecks-with-laravel",{"title":167,"path":168,"stem":169},"Using S6 Overlay","/docs/guide/using-s6-overlay","docs/5.guide/2.using-s6-overlay",{"title":171,"path":172,"stem":173},"Understanding File Permissions","/docs/guide/understanding-file-permissions","docs/5.guide/3.understanding-file-permissions",{"title":175,"path":176,"stem":177},"Configuring Trusted Proxies","/docs/guide/configuring-trusted-proxies","docs/5.guide/4.configuring-trusted-proxies",{"title":179,"icon":55,"defaultOpen":55,"path":180,"stem":181,"children":182,"page":55},"Customization","/docs/customizing-the-image","docs/6.customizing-the-image",[183,187,191],{"title":184,"path":185,"stem":186},"Changing php.ini settings","/docs/customizing-the-image/changing-common-php-settings","docs/6.customizing-the-image/1.changing-common-php-settings",{"title":188,"path":189,"stem":190},"Installing PHP extensions","/docs/customizing-the-image/installing-additional-php-extensions","docs/6.customizing-the-image/2.installing-additional-php-extensions",{"title":192,"path":193,"stem":194},"Adding Start Up Scripts","/docs/customizing-the-image/adding-your-own-start-up-scripts","docs/6.customizing-the-image/3.adding-your-own-start-up-scripts",{"title":196,"path":197,"stem":198,"children":199,"page":55},"Troubleshooting","/docs/troubleshooting","docs/7.troubleshooting",[200,204],{"title":201,"path":202,"stem":203},"Common Issues","/docs/troubleshooting/common-issues","docs/7.troubleshooting/1.common-issues",{"title":205,"path":206,"stem":207},"Getting Help","/docs/troubleshooting/getting-help","docs/7.troubleshooting/2.getting-help",{"title":209,"path":210,"stem":211,"children":212,"page":55},"Reference","/docs/reference","docs/8.reference",[213,217],{"title":214,"path":215,"stem":216},"Environment Variable Specification","/docs/reference/environment-variable-specification","docs/8.reference/1.environment-variable-specification",{"title":218,"path":219,"stem":220},"Command Reference","/docs/reference/command-reference","docs/8.reference/2.command-reference",{"id":222,"title":163,"body":223,"description":680,"extension":681,"links":682,"meta":683,"navigation":686,"path":164,"redirect":682,"seo":687,"stem":165,"__hash__":688},"docs/docs/5.guide/2.using-healthchecks-with-laravel.md",{"type":224,"value":225,"toc":667},"minimark",[226,231,238,248,252,255,259,282,286,289,369,388,392,406,412,425,428,432,435,440,447,453,502,507,511,522,526,556,561,565,573,577,607,612,616,624,628,658,663],[227,228,230],"h2",{"id":229},"native-docker-health-checks-for-laravel","Native Docker Health Checks for Laravel",[232,233,234],"lead-p",{},[235,236,237],"p",{},"Dialing in health checks are very important for ensuring your application is running smoothly and that you're able to deploy updates without any downtime. This guide will explain how our health checks work and how you can use them to your advantage.",[239,240],"iframe",{":allowfullscreen":241,"allow":242,"frameBorder":243,"referrerPolicy":244,"src":245,"style":246,"title":247},"true","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share","0","strict-origin-when-cross-origin","https://www.youtube-nocookie.com/embed/cuYIB5VrH1Q?si=75VBCKAe5x2Hmckd","aspect-ratio: 16/9;","YouTube video player",[227,249,251],{"id":250},"what-are-health-checks","What are Health Checks?",[235,253,254],{},"Health checks are a way to check the status of your application. Whenever a container is started, a health check is performed. If the health check fails, the container will be restarted or marked as unhealthy. Health checks are very important for rolling updates and ensuring your application can start up in order if you have services that depend on each other.",[227,256,258],{"id":257},"our-health-checks","Our Health Checks",[235,260,261,262,266,267,277,278,281],{},"We offer a number of health check commands, specifically for Laravel. You can find these commands are prefixed with ",[263,264,265],"code",{},"healthcheck-"," and are located in ",[268,269,274],"a",{"href":270,"rel":271,"target":273},"https://github.com/serversideup/docker-php/tree/main/src/common/usr/local/bin",[272],"nofollow","_blank",[263,275,276],{},"/usr/local/bin",". The examples below show how to use these health checks in your ",[263,279,280],{},"compose.yml"," file, but you can also use them in other environments.",[227,283,285],{"id":284},"default-health-check-settings","Default Health Check Settings",[235,287,288],{},"By default, our Dockerfiles ship with the following health check commands:",[290,291,292,305],"table",{},[293,294,295],"thead",{},[296,297,298,302],"tr",{},[299,300,301],"th",{},"Variation",[299,303,304],{},"Health Check Command",[306,307,308,319,335,347,358],"tbody",{},[296,309,310,316],{},[311,312,313],"td",{},[263,314,315],{},"cli",[311,317,318],{},"(none)",[296,320,321,326],{},[311,322,323],{},[263,324,325],{},"fpm",[311,327,328],{},[268,329,332],{"href":330,"rel":331,"target":273},"https://github.com/renatomefi/php-fpm-healthcheck",[272],[263,333,334],{},"php-fpm-healthcheck",[296,336,337,342],{},[311,338,339],{},[263,340,341],{},"fpm-apache",[311,343,344],{},[263,345,346],{},"curl --insecure --silent --location --show-error --fail http://localhost:8080$HEALTHCHECK_PATH",[296,348,349,354],{},[311,350,351],{},[263,352,353],{},"fpm-nginx",[311,355,356],{},[263,357,346],{},[296,359,360,365],{},[311,361,362],{},[263,363,364],{},"frankenphp",[311,366,367],{},[263,368,346],{},[370,371,372],"note",{},[235,373,374,375,377,378,380,381,383,384,387],{},"Notice how ",[263,376,341],{},", ",[263,379,353],{},", and ",[263,382,364],{}," have a ",[263,385,386],{},"$HEALTHCHECK_PATH"," variable? This is because you can specify a path for the health check to validate.",[227,389,391],{"id":390},"changing-the-health-check-path","Changing the Health Check Path",[235,393,394,395,397,398,401,402,405],{},"By default, you can see our ",[268,396,214],{"href":215}," shows the ",[263,399,400],{},"HEALTHCHECK_PATH"," variable is set to ",[263,403,404],{},"/healthcheck",".",[407,408,409],"tip",{},[235,410,411],{},"This only validates that FPM-NGINX or FPM-APACHE are running and ready to accept connections. It does not validate that Laravel is running or healthy.",[235,413,414,415,424],{},"If you are using Laravel, ",[268,416,419,420,423],{"href":417,"rel":418,"target":273},"https://laravel.com/docs/12.x/deployment#the-health-route",[272],"modern versions of Laravel will ship with a ",[263,421,422],{},"/up"," route"," that you can use to validate that Laravel is running and healthy.",[235,426,427],{},"You can even create your own custom path in your application if you want. As long as the path returns a 200 status code, the health check will be successful.",[227,429,431],{"id":430},"advanced-laravel-services","Advanced Laravel Services",[235,433,434],{},"Since it is good practice to use the same Docker image for all our services, we also make additional health checks for Laravel's advanced services. If you're looking for rolling updates with zero downtime, it's very important to use these health checks.",[436,437,439],"h3",{"id":438},"laravel-horizon","Laravel Horizon",[235,441,442,443,446],{},"We utilize the ",[263,444,445],{},"artisan horizon:status"," command to check the status of Laravel Horizon. This is a command native to Laravel Horizon and is used to determine if the Horizon process is running.",[235,448,449,450,452],{},"To run this command automatically, you can call our health check command in your ",[263,451,280],{}," file.",[454,455,459],"pre",{"className":456,"code":457,"filename":280,"language":458,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","## Rest of your service configuration...\nhealthcheck:\n  test: [\"CMD\", \"healthcheck-horizon\"]\n","yml",[263,460,461,470,481],{"__ignoreMap":10},[462,463,466],"span",{"class":464,"line":465},"line",1,[462,467,469],{"class":468},"sAwPA","## Rest of your service configuration...\n",[462,471,473,477],{"class":464,"line":472},2,[462,474,476],{"class":475},"s4JwU","healthcheck",[462,478,480],{"class":479},"s95oV",":\n",[462,482,484,487,490,494,496,499],{"class":464,"line":483},3,[462,485,486],{"class":475},"  test",[462,488,489],{"class":479},": [",[462,491,493],{"class":492},"sU2Wk","\"CMD\"",[462,495,377],{"class":479},[462,497,498],{"class":492},"\"healthcheck-horizon\"",[462,500,501],{"class":479},"]\n",[235,503,504],{},[268,505,506],{"href":109},"See a full example of configuring Laravel Horizon →",[436,508,510],{"id":509},"laravel-reverb","Laravel Reverb",[235,512,513,514,517,518,521],{},"We use ",[263,515,516],{},"pgrep"," to check if the ",[263,519,520],{},"reverb:start"," command is running. This ensures the Reverb process is running and ready to accept connections.",[235,523,449,524,452],{},[263,525,280],{},[454,527,529],{"className":456,"code":528,"filename":280,"language":458,"meta":10,"style":10},"## Rest of your service configuration...\nhealthcheck:\n  test: [\"CMD\", \"healthcheck-reverb\"]\n",[263,530,531,535,541],{"__ignoreMap":10},[462,532,533],{"class":464,"line":465},[462,534,469],{"class":468},[462,536,537,539],{"class":464,"line":472},[462,538,476],{"class":475},[462,540,480],{"class":479},[462,542,543,545,547,549,551,554],{"class":464,"line":483},[462,544,486],{"class":475},[462,546,489],{"class":479},[462,548,493],{"class":492},[462,550,377],{"class":479},[462,552,553],{"class":492},"\"healthcheck-reverb\"",[462,555,501],{"class":479},[235,557,558],{},[268,559,560],{"href":113},"See a full example of configuring Laravel Reverb →",[436,562,564],{"id":563},"laravel-scheduler","Laravel Scheduler",[235,566,513,567,517,569,572],{},[263,568,516],{},[263,570,571],{},"schedule:work"," command is running. This ensures the scheduler process is running.",[235,574,449,575,452],{},[263,576,280],{},[454,578,580],{"className":456,"code":579,"filename":280,"language":458,"meta":10,"style":10},"## Rest of your service configuration...\nhealthcheck:\n  test: [\"CMD\", \"healthcheck-schedule\"]\n",[263,581,582,586,592],{"__ignoreMap":10},[462,583,584],{"class":464,"line":465},[462,585,469],{"class":468},[462,587,588,590],{"class":464,"line":472},[462,589,476],{"class":475},[462,591,480],{"class":479},[462,593,594,596,598,600,602,605],{"class":464,"line":483},[462,595,486],{"class":475},[462,597,489],{"class":479},[462,599,493],{"class":492},[462,601,377],{"class":479},[462,603,604],{"class":492},"\"healthcheck-schedule\"",[462,606,501],{"class":479},[235,608,609],{},[268,610,611],{"href":101},"See a full example of configuring Laravel Scheduler →",[436,613,615],{"id":614},"laravel-queue","Laravel Queue",[235,617,513,618,517,620,623],{},[263,619,516],{},[263,621,622],{},"queue:work"," command is running. This ensures the queue process is running.",[235,625,449,626,452],{},[263,627,280],{},[454,629,631],{"className":456,"code":630,"filename":280,"language":458,"meta":10,"style":10},"## Rest of your service configuration...\nhealthcheck:\n  test: [\"CMD\", \"healthcheck-queue\"]\n",[263,632,633,637,643],{"__ignoreMap":10},[462,634,635],{"class":464,"line":465},[462,636,469],{"class":468},[462,638,639,641],{"class":464,"line":472},[462,640,476],{"class":475},[462,642,480],{"class":479},[462,644,645,647,649,651,653,656],{"class":464,"line":483},[462,646,486],{"class":475},[462,648,489],{"class":479},[462,650,493],{"class":492},[462,652,377],{"class":479},[462,654,655],{"class":492},"\"healthcheck-queue\"",[462,657,501],{"class":479},[235,659,660],{},[268,661,662],{"href":105},"See a full example of configuring Laravel Queue →",[664,665,666],"style",{},"html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":10,"searchDepth":472,"depth":472,"links":668},[669,670,671,672,673,674],{"id":229,"depth":472,"text":230},{"id":250,"depth":472,"text":251},{"id":257,"depth":472,"text":258},{"id":284,"depth":472,"text":285},{"id":390,"depth":472,"text":391},{"id":430,"depth":472,"text":431,"children":675},[676,677,678,679],{"id":438,"depth":483,"text":439},{"id":509,"depth":483,"text":510},{"id":563,"depth":483,"text":564},{"id":614,"depth":483,"text":615},"Stop guessing if Laravel is up and running. Our health checks have you covered to ensure Laravel is running properly. It supports HTTP checks, Laravel Horizon, Reverb, Scheduler, and Queue.","md",null,{"head":684,"layout":7},{"title":685},"Native Docker Health Checks for Laravel - Docker PHP - Server Side Up",true,{"title":163,"description":680},"yt5xKCK38h2BBLOOrvPl6YvgcHb271NVHt5WcoqLC1I",[690,692],{"title":159,"path":160,"stem":161,"description":691,"children":-1},"Learn how easy it is to move from the official PHP docker images to serversideup/php.",{"title":167,"path":168,"stem":169,"description":693,"children":-1},"Learn about S6 Overlay and how it is used in this project.",1776367058603]