[{"data":1,"prerenderedAt":540},["ShallowReactive",2],{"navigation":3,"/docs/framework-guides/laravel/horizon":221,"/docs/framework-guides/laravel/horizon-surround":535},[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":108,"body":223,"description":527,"extension":528,"links":529,"meta":530,"navigation":350,"path":109,"redirect":529,"seo":533,"stem":110,"__hash__":534},"docs/docs/3.framework-guides/1.laravel/4.horizon.md",{"type":224,"value":225,"toc":522},"minimark",[226,231,235,239,254,262,268,302,476,480,494,518],[227,228,230],"h2",{"id":229},"laravel-horizon-with-docker","Laravel Horizon with Docker",[232,233,234],"p",{},"Run Laravel Horizon by passing the Artisan command as the container's command. Horizon provides a dashboard and monitoring for your Redis queues.",[227,236,238],{"id":237},"docker-compose-example","Docker Compose example",[240,241,244],"tip",{"target":242,"to":243},"_blank","https://getspin.pro/docs/services/laravel-scheduler",[232,245,246,247,253],{},"Want to skip the setup? ",[248,249,252],"a",{"href":243,"rel":250,"target":242},[251],"nofollow","Spin Pro"," handles Laravel Horizon on your VPS with Docker and zero-downtime deployments—all configured for you.",[232,255,256,257,261],{},"This example runs a dedicated Horizon container using the same image as your web service. Horizon requires Redis to be running and properly configured in your ",[258,259,260],"code",{},".env"," file.",[232,263,264],{},[265,266,267],"strong",{},"Key points:",[269,270,271,275,278,284,299],"ul",{},[272,273,274],"li",{},"Use the same image for both your web and Horizon services",[272,276,277],{},"Ensure Redis is running before starting Horizon",[272,279,280,281,283],{},"Configure Redis connection details in your ",[258,282,260],{}," file",[272,285,286,287,290,291,294,295,298],{},"Set ",[258,288,289],{},"SIGTERM"," as the stop signal for graceful shutdown (especially for ",[258,292,293],{},"fpm-apache"," and ",[258,296,297],{},"fpm-nginx",")",[272,300,301],{},"Include a health check to monitor Horizon status",[303,304,309],"pre",{"className":305,"code":306,"filename":307,"language":308,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  php:\n    image: my/laravel-app\n\n  redis:\n    image: redis:6\n    command: \"redis-server --appendonly yes --requirepass redispassword\"\n\n  horizon:\n    image: my/laravel-app\n    command: [\"php\", \"/var/www/html/artisan\", \"horizon\"]\n    stop_signal: SIGTERM\n    healthcheck:\n      test: [\"CMD\", \"healthcheck-horizon\"]\n      start_period: 10s\n","compose.yml","yml",[258,310,311,324,332,345,352,360,370,381,386,394,403,428,439,447,465],{"__ignoreMap":10},[312,313,316,320],"span",{"class":314,"line":315},"line",1,[312,317,319],{"class":318},"s4JwU","services",[312,321,323],{"class":322},"s95oV",":\n",[312,325,327,330],{"class":314,"line":326},2,[312,328,329],{"class":318},"  php",[312,331,323],{"class":322},[312,333,335,338,341],{"class":314,"line":334},3,[312,336,337],{"class":318},"    image",[312,339,340],{"class":322},": ",[312,342,344],{"class":343},"sU2Wk","my/laravel-app\n",[312,346,348],{"class":314,"line":347},4,[312,349,351],{"emptyLinePlaceholder":350},true,"\n",[312,353,355,358],{"class":314,"line":354},5,[312,356,357],{"class":318},"  redis",[312,359,323],{"class":322},[312,361,363,365,367],{"class":314,"line":362},6,[312,364,337],{"class":318},[312,366,340],{"class":322},[312,368,369],{"class":343},"redis:6\n",[312,371,373,376,378],{"class":314,"line":372},7,[312,374,375],{"class":318},"    command",[312,377,340],{"class":322},[312,379,380],{"class":343},"\"redis-server --appendonly yes --requirepass redispassword\"\n",[312,382,384],{"class":314,"line":383},8,[312,385,351],{"emptyLinePlaceholder":350},[312,387,389,392],{"class":314,"line":388},9,[312,390,391],{"class":318},"  horizon",[312,393,323],{"class":322},[312,395,397,399,401],{"class":314,"line":396},10,[312,398,337],{"class":318},[312,400,340],{"class":322},[312,402,344],{"class":343},[312,404,406,408,411,414,417,420,422,425],{"class":314,"line":405},11,[312,407,375],{"class":318},[312,409,410],{"class":322},": [",[312,412,413],{"class":343},"\"php\"",[312,415,416],{"class":322},", ",[312,418,419],{"class":343},"\"/var/www/html/artisan\"",[312,421,416],{"class":322},[312,423,424],{"class":343},"\"horizon\"",[312,426,427],{"class":322},"]\n",[312,429,431,434,436],{"class":314,"line":430},12,[312,432,433],{"class":318},"    stop_signal",[312,435,340],{"class":322},[312,437,438],{"class":343},"SIGTERM\n",[312,440,442,445],{"class":314,"line":441},13,[312,443,444],{"class":318},"    healthcheck",[312,446,323],{"class":322},[312,448,450,453,455,458,460,463],{"class":314,"line":449},14,[312,451,452],{"class":318},"      test",[312,454,410],{"class":322},[312,456,457],{"class":343},"\"CMD\"",[312,459,416],{"class":322},[312,461,462],{"class":343},"\"healthcheck-horizon\"",[312,464,427],{"class":322},[312,466,468,471,473],{"class":314,"line":467},15,[312,469,470],{"class":318},"      start_period",[312,472,340],{"class":322},[312,474,475],{"class":343},"10s\n",[227,477,479],{"id":478},"advanced-configuration","Advanced configuration",[232,481,482,485,486,488,489,294,491,493],{},[265,483,484],{},"Graceful shutdown:"," The ",[258,487,289],{}," signal ensures Horizon finishes processing current jobs before stopping. This is especially important for ",[258,490,293],{},[258,492,297],{}," images.",[240,495,496],{},[232,497,498,501,502,504,505,507,508,513,514,517],{},[265,499,500],{},"Multiple processes in one container:"," If you're running ",[258,503,297],{}," or ",[258,506,293],{}," and you'd like to have everything in a single container, you can ",[248,509,512],{"href":510,"rel":511,"target":242},"https://github.com/just-containers/s6-overlay/tree/master#writing-a-service-script",[251],"write your own S6 Overlay service script"," to properly manage multiple processes in a single container. Learn more about about this in our ",[248,515,516],{"href":168},"Using S6 Overlay guide",".",[519,520,521],"style",{},"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":326,"depth":326,"links":523},[524,525,526],{"id":229,"depth":326,"text":230},{"id":237,"depth":326,"text":238},{"id":478,"depth":326,"text":479},"Learn how to configure Laravel Horizon with Docker.","md",null,{"head":531,"layout":7},{"title":532},"Laravel Horizon with Docker - Docker PHP - Server Side Up",{"title":108,"description":527},"ZaLYvANle5WM5WenO__m5JyLyDy6EdqL53cdGsgDSmI",[536,538],{"title":104,"path":105,"stem":106,"description":537,"children":-1},"Learn how to configure a Laravel Queue with Docker.",{"title":112,"path":113,"stem":114,"description":539,"children":-1},"Learn how to configure Laravel Reverb with Docker.",1776367066552]