[{"data":1,"prerenderedAt":1719},["ShallowReactive",2],{"navigation":3,"/docs/getting-started/upgrade-guide":221,"/docs/getting-started/upgrade-guide-surround":1714},[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":40,"body":223,"description":1707,"extension":268,"links":1708,"meta":1709,"navigation":391,"path":41,"redirect":1708,"seo":1712,"stem":42,"__hash__":1713},"docs/docs/1.getting-started/7.upgrade-guide.md",{"type":224,"value":225,"toc":1691},"minimark",[226,231,243,255,272,276,279,282,308,318,321,325,329,336,345,349,356,359,364,420,423,427,460,464,472,477,480,585,589,639,643,646,650,653,689,692,696,701,752,757,805,808,812,819,836,893,945,952,956,959,1039,1043,1049,1053,1056,1063,1073,1078,1085,1113,1117,1132,1138,1149,1160,1171,1174,1184,1190,1194,1197,1201,1252,1256,1259,1263,1268,1272,1297,1299,1333,1337,1358,1361,1646,1650,1675,1679,1687],[227,228,230],"h2",{"id":229},"subscribe-to-repository-updates","Subscribe to repository updates",[232,233,234,235,242],"p",{},"Regardless if you are choosing to use automatic updates or manual updates, it is highly advised to subscribe to our releases. You can do this through the \"Watch\" button on our ",[236,237,241],"a",{"href":238,"rel":239},"https://github.com/serversideup/docker-php",[240],"nofollow","GitHub",".",[232,244,245],{},[246,247],"img",{"alt":248,"className":249,"src":254},"Watch Repository",[250,251,252,253],"max-w-md","w-full","h-auto","mx-auto","images/docs/watch-repo.png",[256,257],"u-button",{"ariaLabel":258,"className":259,"color":267,"label":258,"size":268,"to":238,"trailing-icon":269,"variant":270,"target":271},"Subscribe to our Repo",[260,261,262,263,264,265,266],"font-bold","ring","ring-inset","ring-blue-600","text-blue-600","hover:ring-blue-500","hover:text-blue-500","primary","md","i-lucide-arrow-right","outline","_blank",[227,273,275],{"id":274},"choosing-an-image-version","Choosing an image version",[232,277,278],{},"If you do not select a specific patch version, then you will receive automatic PHP updates.",[232,280,281],{},"For example, you can select your version based on the different version numbers:",[283,284,285,294,301],"ul",{},[286,287,288,289,293],"li",{},"Major Version (example: ",[290,291,292],"code",{},"8"," will give you the latest 8.x version)",[286,295,296,297,300],{},"Minor Version (example: ",[290,298,299],{},"8.4"," will give you the latest 8.4.x version)",[286,302,303,304,307],{},"Patch Version (example: ",[290,305,306],{},"8.4.1"," will always stay at the 8.4.1 version)",[232,309,310,311,314,315,317],{},"If you use ",[290,312,313],{},"latest",", you will always get the latest stable version of the CLI variation of PHP. For the best stability in production environments, you may want to pin to a specific patch version (example: ",[290,316,306],{},").",[232,319,320],{},"If you need help choosing an image, see our guide below.",[256,322],{"ariaLabel":323,"className":324,"color":267,"label":323,"size":268,"to":33,"trailing-icon":269,"variant":270},"Learn more about choosing an image",[260,261,262,263,264,265,266],[227,326,328],{"id":327},"release-process","Release process",[232,330,331,332,335],{},"All source code is merged into the ",[290,333,334],{},"main"," branch, which automatically build our \"beta\" images.",[232,337,338,339,344],{},"After testing the images internally and from other community members, we will ",[236,340,343],{"href":341,"rel":342},"https://github.com/serversideup/docker-php/releases",[240],"publish a release on GitHub"," with a detailed changelog.",[227,346,348],{"id":347},"updating-the-docker-images-on-your-own","Updating the Docker images on your own",[232,350,351,352,355],{},"If you You and simply run ",[290,353,354],{},"apt-get update && apt-get upgrade"," within your own image, but still want the image to receive other operating system updates, you will need to run the following commands on your build.",[232,357,358],{},"Any updates that you apply have a risk of breaking other things inside the container. Be sure to have a good testing process in place before applying updates to your production environment.",[360,361,363],"h4",{"id":362},"example-dockerfile-with-manual-updates-for-debian","Example Dockerfile with manual updates for Debian",[365,366,371],"pre",{"className":367,"code":368,"filename":369,"language":370,"meta":10,"style":10},"language-dockerfile shiki shiki-themes github-dark","FROM serversideup/php:8.4.1-fpm-nginx\n\nRUN apt-get update \\\n    && apt-get upgrade -y \\\n    && apt-get clean \\\n    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*\n","Dockerfile","dockerfile",[290,372,373,386,393,402,408,414],{"__ignoreMap":10},[374,375,378,382],"span",{"class":376,"line":377},"line",1,[374,379,381],{"class":380},"snl16","FROM",[374,383,385],{"class":384},"s95oV"," serversideup/php:8.4.1-fpm-nginx\n",[374,387,389],{"class":376,"line":388},2,[374,390,392],{"emptyLinePlaceholder":391},true,"\n",[374,394,396,399],{"class":376,"line":395},3,[374,397,398],{"class":380},"RUN",[374,400,401],{"class":384}," apt-get update \\\n",[374,403,405],{"class":376,"line":404},4,[374,406,407],{"class":384},"    && apt-get upgrade -y \\\n",[374,409,411],{"class":376,"line":410},5,[374,412,413],{"class":384},"    && apt-get clean \\\n",[374,415,417],{"class":376,"line":416},6,[374,418,419],{"class":384},"    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*\n",[232,421,422],{},"If you're running an Alpine-based image, you can use the following commands:",[360,424,426],{"id":425},"example-dockerfile-with-manual-updates-for-alpine","Example Dockerfile with manual updates for Alpine",[365,428,430],{"className":367,"code":429,"filename":369,"language":370,"meta":10,"style":10},"FROM serversideup/php:8.4.1-fpm-nginx-alpine\n\nRUN apk update \\\n    && apk upgrade \\\n    && rm -rf /var/cache/apk/*\n",[290,431,432,439,443,450,455],{"__ignoreMap":10},[374,433,434,436],{"class":376,"line":377},[374,435,381],{"class":380},[374,437,438],{"class":384}," serversideup/php:8.4.1-fpm-nginx-alpine\n",[374,440,441],{"class":376,"line":388},[374,442,392],{"emptyLinePlaceholder":391},[374,444,445,447],{"class":376,"line":395},[374,446,398],{"class":380},[374,448,449],{"class":384}," apk update \\\n",[374,451,452],{"class":376,"line":404},[374,453,454],{"class":384},"    && apk upgrade \\\n",[374,456,457],{"class":376,"line":410},[374,458,459],{"class":384},"    && rm -rf /var/cache/apk/*\n",[227,461,463],{"id":462},"version-3-version-4-migration","Version 3 → Version 4 Migration",[232,465,466,467,471],{},"Version 3 to Version 4 is a much easier migration compared to previous versions. There are ",[468,469,470],"strong",{},"no breaking changes",", so you can simply update your image tag to the latest version and take advantage of the new features.",[473,474,476],"h3",{"id":475},"new-features-in-version-4","New Features in Version 4",[232,478,479],{},"This release focused on expanding image variations, improving Laravel automations, and enhancing the developer experience. Here are the key features:",[283,481,482,488,494,515,524,538,558,572],{},[286,483,484,487],{},[468,485,486],{},"FrankenPHP variation"," - A new production-ready FrankenPHP variation with intelligent defaults, flexible environment configuration, native health checks, and support for Debian and Alpine operating systems.",[286,489,490,493],{},[468,491,492],{},"Revamped documentation site"," - Completely rewritten documentation with improved navigation, better examples, and a modern user experience.",[286,495,496,499,500,503,504,507,508,511,512,242],{},[468,497,498],{},"Enhanced Laravel automations"," - Refactored to use ",[290,501,502],{},"php artisan optimize"," by default (following Laravel best practices), with support for migration modes (",[290,505,506],{},"fresh",", ",[290,509,510],{},"refresh","), database connection selection, seeding options, and easier debugging with ",[290,513,514],{},"AUTORUN_DEBUG",[286,516,517,520,521],{},[468,518,519],{},"Expanded environment variables"," - 25+ new environment variables for fine-tuning PHP, NGINX, Apache, and FrankenPHP configurations. ",[236,522,523],{"href":215},"See the full list of environment variables →",[286,525,526,529,530,533,534,537],{},[468,527,528],{},"Improved health checks"," - Better container startup detection using ",[290,531,532],{},"start-period"," and ",[290,535,536],{},"start-interval"," for more accurate health readings.",[286,539,540,543,544,547,548,507,551,554,555,317],{},[468,541,542],{},"IPv6 support for NGINX"," - Control IP listening protocols with ",[290,545,546],{},"NGINX_LISTEN_IP_PROTOCOL"," (supports ",[290,549,550],{},"ipv4",[290,552,553],{},"ipv6",", or ",[290,556,557],{},"all",[286,559,560,563,564,567,568,571],{},[468,561,562],{},"Enhanced file permissions script"," - ",[290,565,566],{},"docker-php-serversideup-set-file-permissions"," now includes automated service detection and support for multiple directories with the ",[290,569,570],{},"--dir"," flag.",[286,573,574,577,578,533,581,584],{},[468,575,576],{},"Quieter logs"," - Health check requests no longer appear in access logs for ",[290,579,580],{},"fpm-nginx",[290,582,583],{},"fpm-apache"," variations.",[473,586,588],{"id":587},"quality-of-life-improvements","Quality of Life Improvements",[283,590,591,601,615,621],{},[286,592,593,596,597,600],{},[468,594,595],{},"Startup scripts"," - Improved handling of ",[290,598,599],{},"entrypoint.d"," scripts with better error handling and a redesigned container startup info display.",[286,602,603,606,607,610,611,533,613,584],{},[468,604,605],{},"FPM process control"," - Default changed to ",[290,608,609],{},"ondemand"," for even lower resource usage in ",[290,612,580],{},[290,614,583],{},[286,616,617,620],{},[468,618,619],{},"Better Apache logs"," - Access logs now include \"Referer\" and \"User Agent\" for better debugging.",[286,622,623,626,627,630,631,634,635,638],{},[468,624,625],{},"NGINX improvements"," - Added ",[290,628,629],{},"absolute_redirect off;"," for better proxy compatibility, fixed ",[290,632,633],{},"svgz"," handling with Symfony's asset mapper, and allowed ",[290,636,637],{},"robots.txt"," to be dynamically generated by PHP.",[473,640,642],{"id":641},"v4-migration-checklist","V4 Migration Checklist",[232,644,645],{},"Since there are no breaking changes, the migration is straightforward:",[360,647,649],{"id":648},"update-your-images","Update Your Images",[232,651,652],{},"Simply update your image tags to the latest version. For example:",[365,654,659],{"className":655,"code":656,"filename":657,"language":658,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  php:\n    image: serversideup/php:8.5-fpm-nginx\n","compose.yml","yml",[290,660,661,670,677],{"__ignoreMap":10},[374,662,663,667],{"class":376,"line":377},[374,664,666],{"class":665},"s4JwU","services",[374,668,669],{"class":384},":\n",[374,671,672,675],{"class":376,"line":388},[374,673,674],{"class":665},"  php",[374,676,669],{"class":384},[374,678,679,682,685],{"class":376,"line":395},[374,680,681],{"class":665},"    image",[374,683,684],{"class":384},": ",[374,686,688],{"class":687},"sU2Wk","serversideup/php:8.5-fpm-nginx\n",[232,690,691],{},"No other changes are required unless you want to take advantage of new features.",[360,693,695],{"id":694},"optional-leverage-new-features","Optional: Leverage New Features",[232,697,698],{},[468,699,700],{},"Consider enabling Laravel optimizations (if using Laravel):",[365,702,704],{"className":655,"code":703,"filename":657,"language":658,"meta":10,"style":10},"services:\n  php:\n    image: serversideup/php:8.5-fpm-nginx\n    environment:\n      AUTORUN_ENABLED: \"true\"\n      AUTORUN_LARAVEL_OPTIMIZE: \"true\"\n",[290,705,706,712,718,726,733,743],{"__ignoreMap":10},[374,707,708,710],{"class":376,"line":377},[374,709,666],{"class":665},[374,711,669],{"class":384},[374,713,714,716],{"class":376,"line":388},[374,715,674],{"class":665},[374,717,669],{"class":384},[374,719,720,722,724],{"class":376,"line":395},[374,721,681],{"class":665},[374,723,684],{"class":384},[374,725,688],{"class":687},[374,727,728,731],{"class":376,"line":404},[374,729,730],{"class":665},"    environment",[374,732,669],{"class":384},[374,734,735,738,740],{"class":376,"line":410},[374,736,737],{"class":665},"      AUTORUN_ENABLED",[374,739,684],{"class":384},[374,741,742],{"class":687},"\"true\"\n",[374,744,745,748,750],{"class":376,"line":416},[374,746,747],{"class":665},"      AUTORUN_LARAVEL_OPTIMIZE",[374,749,684],{"class":384},[374,751,742],{"class":687},[232,753,754],{},[468,755,756],{},"Try the new FrankenPHP variation:",[365,758,760],{"className":655,"code":759,"filename":657,"language":658,"meta":10,"style":10},"services:\n  php:\n    image: serversideup/php:8.5-frankenphp\n    ports:\n      - 80:8080\n      - 443:8443\n",[290,761,762,768,774,783,790,798],{"__ignoreMap":10},[374,763,764,766],{"class":376,"line":377},[374,765,666],{"class":665},[374,767,669],{"class":384},[374,769,770,772],{"class":376,"line":388},[374,771,674],{"class":665},[374,773,669],{"class":384},[374,775,776,778,780],{"class":376,"line":395},[374,777,681],{"class":665},[374,779,684],{"class":384},[374,781,782],{"class":687},"serversideup/php:8.5-frankenphp\n",[374,784,785,788],{"class":376,"line":404},[374,786,787],{"class":665},"    ports",[374,789,669],{"class":384},[374,791,792,795],{"class":376,"line":410},[374,793,794],{"class":384},"      - ",[374,796,797],{"class":687},"80:8080\n",[374,799,800,802],{"class":376,"line":416},[374,801,794],{"class":384},[374,803,804],{"class":687},"443:8443\n",[232,806,807],{},"That's it! Version 4 is designed to be a smooth, non-breaking upgrade that gives you more flexibility and features when you need them.",[227,809,811],{"id":810},"version-2-version-3-migration","Version 2 → Version 3 Migration",[232,813,814,815,818],{},"If you're an existing user of our v2 images, be sure that your current configurations are NOT set to use the latest images. To do this, you can lock your images into the ",[290,816,817],{},"v2.2.1"," tag. This will ensure that you're not automatically upgraded to the v3 images.",[232,820,821,822,825,826,828,829,835],{},"For example, if you are using ",[290,823,824],{},"8.2-fpm-nginx",", you would change your ",[290,827,657],{}," file to use the ",[236,830,833],{"href":831,"rel":832,"target":271},"https://hub.docker.com/r/serversideup/php/tags?page=1&name=2.2.1",[240],[290,834,817],{}," tag:",[365,837,840],{"className":655,"code":838,"filename":657,"highlights":839,"language":658,"meta":10,"style":10},"services:\n  php:\n    image: serversideup/php:8.2-fpm-nginx\n    ports:\n      - 80:80\n    volumes:\n      - .:/var/www/html\n",[395],[290,841,842,848,854,865,871,878,885],{"__ignoreMap":10},[374,843,844,846],{"class":376,"line":377},[374,845,666],{"class":665},[374,847,669],{"class":384},[374,849,850,852],{"class":376,"line":388},[374,851,674],{"class":665},[374,853,669],{"class":384},[374,855,858,860,862],{"class":856,"line":395},[376,857],"highlight",[374,859,681],{"class":665},[374,861,684],{"class":384},[374,863,864],{"class":687},"serversideup/php:8.2-fpm-nginx\n",[374,866,867,869],{"class":376,"line":404},[374,868,787],{"class":665},[374,870,669],{"class":384},[374,872,873,875],{"class":376,"line":410},[374,874,794],{"class":384},[374,876,877],{"class":687},"80:80\n",[374,879,880,883],{"class":376,"line":416},[374,881,882],{"class":665},"    volumes",[374,884,669],{"class":384},[374,886,888,890],{"class":376,"line":887},7,[374,889,794],{"class":384},[374,891,892],{"class":687},".:/var/www/html\n",[365,894,897],{"className":655,"code":895,"filename":657,"highlights":896,"language":658,"meta":10,"style":10},"services:\n  php:\n    image: serversideup/php:8.2-fpm-nginx-v2.2.1\n    ports:\n      - 80:80\n    volumes:\n      - .:/var/www/html\n",[395],[290,898,899,905,911,921,927,933,939],{"__ignoreMap":10},[374,900,901,903],{"class":376,"line":377},[374,902,666],{"class":665},[374,904,669],{"class":384},[374,906,907,909],{"class":376,"line":388},[374,908,674],{"class":665},[374,910,669],{"class":384},[374,912,914,916,918],{"class":913,"line":395},[376,857],[374,915,681],{"class":665},[374,917,684],{"class":384},[374,919,920],{"class":687},"serversideup/php:8.2-fpm-nginx-v2.2.1\n",[374,922,923,925],{"class":376,"line":404},[374,924,787],{"class":665},[374,926,669],{"class":384},[374,928,929,931],{"class":376,"line":410},[374,930,794],{"class":384},[374,932,877],{"class":687},[374,934,935,937],{"class":376,"line":416},[374,936,882],{"class":665},[374,938,669],{"class":384},[374,940,941,943],{"class":376,"line":887},[374,942,794],{"class":384},[374,944,892],{"class":687},[232,946,947,948,951],{},"All you need to do is add ",[290,949,950],{},"-v2.2.1"," to the end of the image tag. This will ensure that you're not automatically upgraded to the v3 images.",[473,953,955],{"id":954},"new-features-in-version-3","New Features in Version 3",[232,957,958],{},"We've been busy overhauling our PHP Docker Images to make them more production-ready and easier to use. Here are some of the new features we've added:",[283,960,961,967,973,979,992,1002,1027,1033],{},[286,962,963,966],{},[468,964,965],{},"Based on official PHP Images"," - We're now building an improved developer experience on top of the official PHP Docker images.",[286,968,969,972],{},[468,970,971],{},"Unprivileged by default"," - We're now running our images as an unprivileged user by default. This is a huge step forward in security and compatibility.",[286,974,975,978],{},[468,976,977],{},"PHP 8.4 support"," - We're now shipping the latest and greatest.",[286,980,981,984,985,988,989,242],{},[468,982,983],{},"Pin to the exact minor version"," - Pin your app to the exact minor version of PHP that you want to use. This means you can pin to ",[290,986,987],{},"8.2.12"," instead of ",[290,990,991],{},"8.2",[286,993,994,997,998,1001],{},[468,995,996],{},"Easier start up script customization"," - We now have a folder called ",[290,999,1000],{},"/etc/entrypoint.d"," that allows you to easily customize your container with scripts. Just put them in numerical order and we'll execute any shell script you want. No S6 Overlay knowledge required.",[286,1003,1004,1007,1008,507,1011,507,1014,507,1017,507,1020,1023,1024],{},[468,1005,1006],{},"Expanded Laravel Automations"," - We added automations to run ",[290,1009,1010],{},"config:cache",[290,1012,1013],{},"route:cache",[290,1015,1016],{},"view:cache",[290,1018,1019],{},"event:cache",[290,1021,1022],{},"migrate --force --isolated",", and ",[290,1025,1026],{},"storage:link",[286,1028,1029,1032],{},[468,1030,1031],{},"NGINX Unit Support"," - We're offering NGINX Unit as a variation as an alternative to PHP-FPM. This allows you to run PHP applications without the need for a webserver like NGINX or Apache to run with PHP-FPM.",[286,1034,1035,1038],{},[468,1036,1037],{},"Available on GitHub Packages"," - We're now publishing our images to GitHub Packages. This means you can use our images without needing to authenticate with Docker Hub.",[473,1040,1042],{"id":1041},"breaking-changes-in-version-3","Breaking changes in Version 3",[1044,1045,1046],"caution",{},[232,1047,1048],{},"The following changes are considered to be \"breaking changes\" and will require you to make changes to your application.",[360,1050,1052],{"id":1051},"ubuntu-is-no-longer-used-as-a-base-image","Ubuntu is no longer used as a base image",[232,1054,1055],{},"We now use Debian or Alpine as our base OS (because we're using the official PHP images as a base). This is a huge change, but we're confident this will be the best direction moving forward.",[360,1057,1059,1062],{"id":1058},"ppaondrejphp-is-no-longer-used",[290,1060,1061],{},"ppa:ondrej/php"," is no longer used",[232,1064,1065,1066,1068,1069,1072],{},"Since we're using PHP.net as the \"official source of truth\" for getting our PHP versions, this means we're also dropping support for the ",[290,1067,1061],{}," repository. If you're using things like ",[290,1070,1071],{},"apt-get install php-redis"," you will need to change your method of installing PHP extensions.",[232,1074,1075],{},[236,1076,1077],{"href":189},"Learn how to install your own PHP extension →",[360,1079,1081,1084],{"id":1080},"webuser-is-no-longer-being-used",[290,1082,1083],{},"webuser"," is no longer being used",[232,1086,1087,1088,1090,1091,1094,1095,1098,1099,1102,1103,1105,1106,1109,1110,242],{},"We used to add a user called ",[290,1089,1083],{}," with the UID of ",[290,1092,1093],{},"9999"," with shell permissions. To increase security, we're now using the ",[290,1096,1097],{},"www-data"," user and group that is built into the official PHP images. If you have mounted volumes, you will need to ",[290,1100,1101],{},"chown"," the files to match the ID of the ",[290,1104,1097],{}," user and groups. For Debian, this is ",[290,1107,1108],{},"33:33"," and for Alpine, this is ",[290,1111,1112],{},"82:82",[360,1114,1116],{"id":1115},"nginx-and-apache-listen-on-8080-http-and-8443-https-by-default","NGINX and Apache listen on 8080 (HTTP) and 8443 (HTTPS) by default",[232,1118,1119,1120,533,1123,988,1126,533,1129,242],{},"Our images are now unprivileged by default. This is a major step forward in security and compatibility. Since we are unprivileged by default, we lose the ability to mount on ports less than 1024. If you're using NGINX or Apache, you will need to update your port mappings to use ",[290,1121,1122],{},"8080",[290,1124,1125],{},"8443",[290,1127,1128],{},"80",[290,1130,1131],{},"443",[232,1133,1134],{},[236,1135,1137],{"href":1136},"/docs/getting-started/default-configurations#unprivileged-by-default","Learn more about this change →",[360,1139,1141,1142,533,1145,1148],{"id":1140},"s6-overlay-is-only-used-in-fpm-apache-and-fpm-nginx-images","S6 Overlay is only used in ",[290,1143,1144],{},"*-fpm-apache",[290,1146,1147],{},"*-fpm-nginx"," images",[232,1150,1151,1152,533,1154,1156,1157,1159],{},"Due to compatibility issues, we only use S6 Overlay in our ",[290,1153,1144],{},[290,1155,1147],{}," images. If you were using S6 Overlay for our other variations (cli, fpm, etc), you will need to migrate your scripts to use the new ",[290,1158,1000],{}," folder.",[360,1161,1163,1166,1167,1170],{"id":1162},"ssl_mode-is-now-set-to-off-by-default-http-only",[290,1164,1165],{},"SSL_MODE"," is now set to ",[290,1168,1169],{},"off"," by default (HTTP only)",[232,1172,1173],{},"Running end-to-end SSL by default created more problems than good. By default, we're now shipping HTTP-only by default with the option for people to turn this on.",[360,1175,1177,1166,1180,1183],{"id":1176},"autorun_enabled-is-now-set-to-false-by-default",[290,1178,1179],{},"AUTORUN_ENABLED",[290,1181,1182],{},"false"," by default.",[232,1185,1186,1187,242],{},"Having this set to \"true\" by default also created more problems than good. If you want to use any of the Laravel Automation Scripts, be sure to set this to ",[290,1188,1189],{},"true",[360,1191,1193],{"id":1192},"msmtp-is-no-longer-included-in-the-images","MSMTP is no longer included in the images",[232,1195,1196],{},"For security and image size reasons, we removed MSMTP from the images. If you need to send emails, use an external SMTP service like Postmark/Sendgrid/Mailgun. You can also extend the image yourself to include MSMTP specifically for your use case.",[360,1198,1200],{"id":1199},"variable-deprecations","Variable deprecations",[283,1202,1203,1212,1221,1234,1243],{},[286,1204,1205,1208,1209],{},[290,1206,1207],{},"WEB_APP_DIRECTORY"," has now been renamed to ",[290,1210,1211],{},"APP_BASE_DIR",[286,1213,1214,1217,1218],{},[290,1215,1216],{},"DEBUG_OUTPUT"," has been removed for in favor of ",[290,1219,1220],{},"LOG_OUTPUT_LEVEL=debug",[286,1222,1223,1226,1227,1230,1231],{},[290,1224,1225],{},"PUID"," & ",[290,1228,1229],{},"PGID"," are no longer used because it requires root privileges. See the ",[236,1232,1233],{"href":172},"new way to set the UID and GID →",[286,1235,1236,1226,1239,1242],{},[290,1237,1238],{},"MSMTP_RELAY_SERVER_HOSTNAME",[290,1240,1241],{},"MSMTP_RELAY_SERVER_PORT"," are no longer used because MSMTP is no longer included in the images.",[286,1244,1245,1248,1249],{},[290,1246,1247],{},"PHP_POOL_NAME"," has been renamed to ",[290,1250,1251],{},"PHP_FPM_POOL_NAME",[473,1253,1255],{"id":1254},"v3-migration-checklist","V3 Migration Checklist",[232,1257,1258],{},"Here is a good list to perform the V3 migration.",[360,1260,1262],{"id":1261},"repository","Repository",[283,1264,1265],{},[286,1266,1267],{},"Ensure you're committing to a test environment",[360,1269,1271],{"id":1270},"docker-compose","Docker Compose",[283,1273,1274,1277,1282,1290],{},[286,1275,1276],{},"Update the image name (if applicable)",[286,1278,1279,1280],{},"Check each environment variable exists and is set to a proper value ",[236,1281,523],{"href":215},[286,1283,1284,1285,533,1287,1289],{},"Ensure you updated the ports to ",[290,1286,1122],{},[290,1288,1125],{}," for NGINX, Apache, and Unit",[286,1291,1292,1293,1296],{},"Consider adding ",[290,1294,1295],{},"PHP_OPCACHE_ENABLE=1"," to your production environment for increased performance",[360,1298,369],{"id":370},[283,1300,1301,1304,1310,1313,1322],{},[286,1302,1303],{},"Update the base image name (if applicable)",[286,1305,1306,1307,1309],{},"Remove any ",[290,1308,1061],{}," references",[286,1311,1312],{},"Remove any Ubuntu specific commands",[286,1314,1315,1316,1319,1320],{},"Ensure all extensions are installed with the ",[290,1317,1318],{},"install-php-extensions"," command ",[236,1321,1077],{"href":189},[286,1323,1324,1325,1328,1329,1332],{},"Ensure your ",[290,1326,1327],{},"COPY"," commands are copying with the correct permissions (i.e. ",[290,1330,1331],{},"--chown=www-data:www-data",")",[360,1334,1336],{"id":1335},"cicd","CI/CD",[232,1338,1339,1340,1342,1343,1346,1347,533,1350,1353,1354,1357],{},"If you're running ",[290,1341,580],{}," (or similar) on a runner that's running as your builds as ",[290,1344,1345],{},"root",", you may need to add ",[290,1348,1349],{},"user = www-data",[290,1351,1352],{},"group = www-data"," to your ",[290,1355,1356],{},"php-fpm.conf"," file so you can bring FPM up correctly.",[232,1359,1360],{},"If you have to run things as root in CI, you can do this with a multi stage build and set the targets:",[365,1362,1364],{"className":367,"code":1363,"filename":369,"language":370,"meta":10,"style":10},"############################################\n# Base Image\n############################################\n\n# Learn more about the Server Side Up PHP Docker Images at:\n# https://serversideup.net/open-source/docker-php/\nFROM serversideup/php:8.4-fpm-nginx AS base\n\n## Uncomment if you need to install additional PHP extensions\n# USER root\n# RUN install-php-extensions bcmath gd\n\n############################################\n# Development Image\n############################################\nFROM base AS development\n\n# We can pass USER_ID and GROUP_ID as build arguments\n# to ensure the www-data user has the same UID and GID\n# as the user running Docker.\nARG USER_ID\nARG GROUP_ID\n\n# Switch to root so we can set the user ID and group ID\nUSER root\nRUN docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID  && \\\n    docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID\nUSER www-data\n\n############################################\n# CI image\n############################################\nFROM base AS ci\n\n# Sometimes CI images need to run as root\nUSER root\n\n############################################\n# Production Image\n############################################\nFROM base AS deploy\nCOPY --chown=www-data:www-data . /var/www/html\nUSER www-data\n",[290,1365,1366,1372,1377,1381,1385,1390,1395,1408,1413,1419,1425,1431,1436,1441,1447,1452,1465,1470,1476,1482,1488,1497,1505,1510,1516,1525,1533,1539,1547,1552,1557,1563,1568,1580,1585,1591,1598,1603,1608,1614,1619,1631,1639],{"__ignoreMap":10},[374,1367,1368],{"class":376,"line":377},[374,1369,1371],{"class":1370},"sAwPA","############################################\n",[374,1373,1374],{"class":376,"line":388},[374,1375,1376],{"class":1370},"# Base Image\n",[374,1378,1379],{"class":376,"line":395},[374,1380,1371],{"class":1370},[374,1382,1383],{"class":376,"line":404},[374,1384,392],{"emptyLinePlaceholder":391},[374,1386,1387],{"class":376,"line":410},[374,1388,1389],{"class":1370},"# Learn more about the Server Side Up PHP Docker Images at:\n",[374,1391,1392],{"class":376,"line":416},[374,1393,1394],{"class":1370},"# https://serversideup.net/open-source/docker-php/\n",[374,1396,1397,1399,1402,1405],{"class":376,"line":887},[374,1398,381],{"class":380},[374,1400,1401],{"class":384}," serversideup/php:8.4-fpm-nginx ",[374,1403,1404],{"class":380},"AS",[374,1406,1407],{"class":384}," base\n",[374,1409,1411],{"class":376,"line":1410},8,[374,1412,392],{"emptyLinePlaceholder":391},[374,1414,1416],{"class":376,"line":1415},9,[374,1417,1418],{"class":1370},"## Uncomment if you need to install additional PHP extensions\n",[374,1420,1422],{"class":376,"line":1421},10,[374,1423,1424],{"class":1370},"# USER root\n",[374,1426,1428],{"class":376,"line":1427},11,[374,1429,1430],{"class":1370},"# RUN install-php-extensions bcmath gd\n",[374,1432,1434],{"class":376,"line":1433},12,[374,1435,392],{"emptyLinePlaceholder":391},[374,1437,1439],{"class":376,"line":1438},13,[374,1440,1371],{"class":1370},[374,1442,1444],{"class":376,"line":1443},14,[374,1445,1446],{"class":1370},"# Development Image\n",[374,1448,1450],{"class":376,"line":1449},15,[374,1451,1371],{"class":1370},[374,1453,1455,1457,1460,1462],{"class":376,"line":1454},16,[374,1456,381],{"class":380},[374,1458,1459],{"class":384}," base ",[374,1461,1404],{"class":380},[374,1463,1464],{"class":384}," development\n",[374,1466,1468],{"class":376,"line":1467},17,[374,1469,392],{"emptyLinePlaceholder":391},[374,1471,1473],{"class":376,"line":1472},18,[374,1474,1475],{"class":1370},"# We can pass USER_ID and GROUP_ID as build arguments\n",[374,1477,1479],{"class":376,"line":1478},19,[374,1480,1481],{"class":1370},"# to ensure the www-data user has the same UID and GID\n",[374,1483,1485],{"class":376,"line":1484},20,[374,1486,1487],{"class":1370},"# as the user running Docker.\n",[374,1489,1491,1494],{"class":376,"line":1490},21,[374,1492,1493],{"class":380},"ARG",[374,1495,1496],{"class":384}," USER_ID\n",[374,1498,1500,1502],{"class":376,"line":1499},22,[374,1501,1493],{"class":380},[374,1503,1504],{"class":384}," GROUP_ID\n",[374,1506,1508],{"class":376,"line":1507},23,[374,1509,392],{"emptyLinePlaceholder":391},[374,1511,1513],{"class":376,"line":1512},24,[374,1514,1515],{"class":1370},"# Switch to root so we can set the user ID and group ID\n",[374,1517,1519,1522],{"class":376,"line":1518},25,[374,1520,1521],{"class":380},"USER",[374,1523,1524],{"class":384}," root\n",[374,1526,1528,1530],{"class":376,"line":1527},26,[374,1529,398],{"class":380},[374,1531,1532],{"class":384}," docker-php-serversideup-set-id www-data $USER_ID:$GROUP_ID  && \\\n",[374,1534,1536],{"class":376,"line":1535},27,[374,1537,1538],{"class":384},"    docker-php-serversideup-set-file-permissions --owner $USER_ID:$GROUP_ID\n",[374,1540,1542,1544],{"class":376,"line":1541},28,[374,1543,1521],{"class":380},[374,1545,1546],{"class":384}," www-data\n",[374,1548,1550],{"class":376,"line":1549},29,[374,1551,392],{"emptyLinePlaceholder":391},[374,1553,1555],{"class":376,"line":1554},30,[374,1556,1371],{"class":1370},[374,1558,1560],{"class":376,"line":1559},31,[374,1561,1562],{"class":1370},"# CI image\n",[374,1564,1566],{"class":376,"line":1565},32,[374,1567,1371],{"class":1370},[374,1569,1571,1573,1575,1577],{"class":376,"line":1570},33,[374,1572,381],{"class":380},[374,1574,1459],{"class":384},[374,1576,1404],{"class":380},[374,1578,1579],{"class":384}," ci\n",[374,1581,1583],{"class":376,"line":1582},34,[374,1584,392],{"emptyLinePlaceholder":391},[374,1586,1588],{"class":376,"line":1587},35,[374,1589,1590],{"class":1370},"# Sometimes CI images need to run as root\n",[374,1592,1594,1596],{"class":376,"line":1593},36,[374,1595,1521],{"class":380},[374,1597,1524],{"class":384},[374,1599,1601],{"class":376,"line":1600},37,[374,1602,392],{"emptyLinePlaceholder":391},[374,1604,1606],{"class":376,"line":1605},38,[374,1607,1371],{"class":1370},[374,1609,1611],{"class":376,"line":1610},39,[374,1612,1613],{"class":1370},"# Production Image\n",[374,1615,1617],{"class":376,"line":1616},40,[374,1618,1371],{"class":1370},[374,1620,1622,1624,1626,1628],{"class":376,"line":1621},41,[374,1623,381],{"class":380},[374,1625,1459],{"class":384},[374,1627,1404],{"class":380},[374,1629,1630],{"class":384}," deploy\n",[374,1632,1634,1636],{"class":376,"line":1633},42,[374,1635,1327],{"class":380},[374,1637,1638],{"class":384}," --chown=www-data:www-data . /var/www/html\n",[374,1640,1642,1644],{"class":376,"line":1641},43,[374,1643,1521],{"class":380},[374,1645,1546],{"class":384},[360,1647,1649],{"id":1648},"productionstaging-servers","Production/Staging Servers",[283,1651,1652,1667],{},[286,1653,1654,1655,1657,1658,1660,1661,1663,1664],{},"Update all host volume file permissions to match the ",[290,1656,1097],{}," UID/GID (",[290,1659,1108],{}," for Debian, ",[290,1662,1112],{}," for Alpine) ",[236,1665,1666],{"href":172},"Learn how to manage file permissions",[286,1668,1669,1670,1332],{},"If you're running Docker Swarm with host volume mounts, we created a script that could potentially help (",[236,1671,1674],{"href":1672,"rel":1673},"https://github.com/serversideup/docker-volume-change-permission-script",[240],"change-volume-permissions.sh",[360,1676,1678],{"id":1677},"deployment","Deployment",[283,1680,1681,1684],{},[286,1682,1683],{},"CI/CD with valid tests is always encouraged",[286,1685,1686],{},"After completing all steps above, you're now ready to deploy the new images",[1688,1689,1690],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}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);}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":10,"searchDepth":388,"depth":388,"links":1692},[1693,1694,1695,1696,1697,1702],{"id":229,"depth":388,"text":230},{"id":274,"depth":388,"text":275},{"id":327,"depth":388,"text":328},{"id":347,"depth":388,"text":348},{"id":462,"depth":388,"text":463,"children":1698},[1699,1700,1701],{"id":475,"depth":395,"text":476},{"id":587,"depth":395,"text":588},{"id":641,"depth":395,"text":642},{"id":810,"depth":388,"text":811,"children":1703},[1704,1705,1706],{"id":954,"depth":395,"text":955},{"id":1041,"depth":395,"text":1042},{"id":1254,"depth":395,"text":1255},"Learn how the serversideup/php Docker images are built and how to upgrade.",null,{"head":1710,"layout":7},{"title":1711},"Upgrade Guide - Docker PHP - Server Side Up",{"title":40,"description":1707},"OgyQl_uCek0bmUG0dQExemD1E1rRf9cidAfL5Y7ihSI",[1715,1717],{"title":36,"path":37,"stem":38,"description":1716,"children":-1},"Learn how to get started with serversideup/php Docker Images.",{"title":44,"path":45,"stem":46,"description":1718,"children":-1},"See the latest releases and changes for the PHP Docker Image project.",1776367053013]