[{"data":1,"prerenderedAt":957},["ShallowReactive",2],{"navigation":3,"/docs/upgrading/upgrade-to-v3":249,"/docs/upgrading/upgrade-to-v3-surround":952},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","/docs","docs",[9,12,48,77,132,160,185,206,219,236],{"title":10,"path":6,"stem":11},"","docs/index",{"title":13,"path":14,"stem":15,"children":16,"icon":47},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[17,19,23,27,31,35,39,43],{"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},"Migrating from official PHP images","/docs/getting-started/migrating-from-official-php-images","docs/1.getting-started/7.migrating-from-official-php-images",{"title":44,"path":45,"stem":46},"Contributing","/docs/getting-started/contributing","docs/1.getting-started/99.contributing",false,{"title":49,"path":50,"stem":51,"children":52,"page":47},"Image Variations","/docs/image-variations","docs/2.image-variations",[53,57,61,65,69,73],{"title":54,"path":55,"stem":56},"CLI","/docs/image-variations/cli","docs/2.image-variations/cli",{"title":58,"path":59,"stem":60},"FPM","/docs/image-variations/fpm","docs/2.image-variations/fpm",{"title":62,"path":63,"stem":64},"FPM-Apache","/docs/image-variations/fpm-apache","docs/2.image-variations/fpm-apache",{"title":66,"path":67,"stem":68},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/2.image-variations/fpm-nginx",{"title":70,"path":71,"stem":72},"FrankenPHP","/docs/image-variations/frankenphp","docs/2.image-variations/frankenphp",{"title":74,"path":75,"stem":76},"NGINX Unit (removed)","/docs/image-variations/unit","docs/2.image-variations/unit",{"title":78,"path":79,"stem":80,"children":81,"page":47},"Framework Guides","/docs/framework-guides","docs/3.framework-guides",[82,123],{"title":83,"icon":47,"defaultOpen":47,"path":84,"stem":85,"children":86,"page":47},"Laravel","/docs/framework-guides/laravel","docs/3.framework-guides/1.laravel",[87,91,95,99,103,107,111,115,119],{"title":88,"path":89,"stem":90},"Automations","/docs/framework-guides/laravel/automations","docs/3.framework-guides/1.laravel/1.automations",{"title":92,"path":93,"stem":94},"Running workers","/docs/framework-guides/laravel/workers","docs/3.framework-guides/1.laravel/2.workers",{"title":96,"path":97,"stem":98},"Health checks","/docs/framework-guides/laravel/health-checks","docs/3.framework-guides/1.laravel/3.health-checks",{"title":100,"path":101,"stem":102},"Horizon","/docs/framework-guides/laravel/horizon","docs/3.framework-guides/1.laravel/4.horizon",{"title":104,"path":105,"stem":106},"Nightwatch","/docs/framework-guides/laravel/nightwatch","docs/3.framework-guides/1.laravel/5.nightwatch",{"title":108,"path":109,"stem":110},"Octane","/docs/framework-guides/laravel/octane","docs/3.framework-guides/1.laravel/6.octane",{"title":112,"path":113,"stem":114},"Queue","/docs/framework-guides/laravel/queue","docs/3.framework-guides/1.laravel/7.queue",{"title":116,"path":117,"stem":118},"Reverb","/docs/framework-guides/laravel/reverb","docs/3.framework-guides/1.laravel/8.reverb",{"title":120,"path":121,"stem":122},"Task scheduler","/docs/framework-guides/laravel/task-scheduler","docs/3.framework-guides/1.laravel/9.task-scheduler",{"title":124,"icon":47,"defaultOpen":47,"path":125,"stem":126,"children":127,"page":47},"WordPress","/docs/framework-guides/wordpress","docs/3.framework-guides/2.wordpress",[128],{"title":129,"path":130,"stem":131},"Using WordPress with Docker","/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":47},"Deployment And Production","/docs/deployment-and-production","docs/4.deployment-and-production",[137,141,145,148,152,156],{"title":138,"path":139,"stem":140},"Packaging your app for deployment","/docs/deployment-and-production/packaging-your-app-for-deployment","docs/4.deployment-and-production/1.packaging-your-app-for-deployment",{"title":142,"path":143,"stem":144},"Configuring SSL","/docs/deployment-and-production/configuring-ssl","docs/4.deployment-and-production/2.configuring-ssl",{"title":96,"path":146,"stem":147},"/docs/deployment-and-production/health-checks","docs/4.deployment-and-production/3.health-checks",{"title":149,"path":150,"stem":151},"Configuring trusted proxies","/docs/deployment-and-production/configuring-trusted-proxies","docs/4.deployment-and-production/4.configuring-trusted-proxies",{"title":153,"path":154,"stem":155},"Production performance tuning","/docs/deployment-and-production/production-performance-tuning","docs/4.deployment-and-production/5.production-performance-tuning",{"title":157,"path":158,"stem":159},"Choosing a host","/docs/deployment-and-production/choosing-a-host","docs/4.deployment-and-production/6.choosing-a-host",{"title":161,"icon":47,"defaultOpen":47,"path":162,"stem":163,"children":164,"page":47},"Customization","/docs/customizing-the-image","docs/5.customizing-the-image",[165,169,173,177,181],{"title":166,"path":167,"stem":168},"Changing php.ini settings","/docs/customizing-the-image/changing-common-php-settings","docs/5.customizing-the-image/1.changing-common-php-settings",{"title":170,"path":171,"stem":172},"Installing PHP extensions","/docs/customizing-the-image/installing-additional-php-extensions","docs/5.customizing-the-image/2.installing-additional-php-extensions",{"title":174,"path":175,"stem":176},"Adding start up scripts","/docs/customizing-the-image/adding-your-own-start-up-scripts","docs/5.customizing-the-image/3.adding-your-own-start-up-scripts",{"title":178,"path":179,"stem":180},"Using S6 Overlay","/docs/customizing-the-image/using-s6-overlay","docs/5.customizing-the-image/4.using-s6-overlay",{"title":182,"path":183,"stem":184},"Understanding file permissions","/docs/customizing-the-image/understanding-file-permissions","docs/5.customizing-the-image/5.understanding-file-permissions",{"title":186,"icon":47,"defaultOpen":47,"path":187,"stem":188,"children":189,"page":47},"Upgrading","/docs/upgrading","docs/6.upgrading",[190,194,198,202],{"title":191,"path":192,"stem":193},"Upgrade guide","/docs/upgrading/upgrade-guide","docs/6.upgrading/1.upgrade-guide",{"title":195,"path":196,"stem":197},"Upgrade to v5","/docs/upgrading/upgrade-to-v5","docs/6.upgrading/2.upgrade-to-v5",{"title":199,"path":200,"stem":201},"Upgrade to v4","/docs/upgrading/upgrade-to-v4","docs/6.upgrading/3.upgrade-to-v4",{"title":203,"path":204,"stem":205},"Upgrade to v3","/docs/upgrading/upgrade-to-v3","docs/6.upgrading/4.upgrade-to-v3",{"title":207,"path":208,"stem":209,"children":210,"page":47},"Troubleshooting","/docs/troubleshooting","docs/7.troubleshooting",[211,215],{"title":212,"path":213,"stem":214},"Common issues","/docs/troubleshooting/common-issues","docs/7.troubleshooting/1.common-issues",{"title":216,"path":217,"stem":218},"Getting help","/docs/troubleshooting/getting-help","docs/7.troubleshooting/2.getting-help",{"title":220,"path":221,"stem":222,"children":223,"page":47},"Security","/docs/security","docs/8.security",[224,228,232],{"title":225,"path":226,"stem":227},"How images are built","/docs/security/how-images-are-built","docs/8.security/1.how-images-are-built",{"title":229,"path":230,"stem":231},"Verifying images","/docs/security/verifying-images","docs/8.security/2.verifying-images",{"title":233,"path":234,"stem":235},"Vulnerability scanning","/docs/security/vulnerability-scanning","docs/8.security/3.vulnerability-scanning",{"title":237,"path":238,"stem":239,"children":240,"page":47},"Reference","/docs/reference","docs/9.reference",[241,245],{"title":242,"path":243,"stem":244},"Environment variable specification","/docs/reference/environment-variable-specification","docs/9.reference/1.environment-variable-specification",{"title":246,"path":247,"stem":248},"Command reference","/docs/reference/command-reference","docs/9.reference/2.command-reference",{"id":250,"title":203,"body":251,"description":943,"extension":944,"links":945,"meta":946,"navigation":949,"path":204,"redirect":945,"seo":950,"stem":205,"__hash__":951},"docs/docs/6.upgrading/4.upgrade-to-v3.md",{"type":252,"value":253,"toc":923},"minimark",[254,261,266,274,320,324,498,502,523,530,551,584,587,603,606,722,728,735,744,751,759,766,775,778,781,785,834,838,865,869,919],[255,256,257],"lead-p",{},[258,259,260],"p",{},"Version 3 rebuilt the images on the official PHP images and runs them as an unprivileged user. Most v2 setups need changes to ports, file ownership, and how extensions are installed.",[262,263,265],"h2",{"id":264},"stay-on-v2-while-you-migrate","Stay on v2 while you migrate",[258,267,268,269,273],{},"Add ",[270,271,272],"code",{},"-v2.2.1"," to your tag so you aren't upgraded before you're ready:",[275,276,283],"pre",{"className":277,"code":278,"filename":279,"highlights":280,"language":282,"meta":10,"style":10},"language-yaml shiki shiki-themes github-dark","services:\n  php:\n    image: serversideup/php:8.2-fpm-nginx-v2.2.1\n","compose.yml",[281],3,"yaml",[270,284,285,298,306],{"__ignoreMap":10},[286,287,290,294],"span",{"class":288,"line":289},"line",1,[286,291,293],{"class":292},"s4JwU","services",[286,295,297],{"class":296},"s95oV",":\n",[286,299,301,304],{"class":288,"line":300},2,[286,302,303],{"class":292},"  php",[286,305,297],{"class":296},[286,307,310,313,316],{"class":308,"line":281},[288,309],"highlight",[286,311,312],{"class":292},"    image",[286,314,315],{"class":296},": ",[286,317,319],{"class":318},"sU2Wk","serversideup/php:8.2-fpm-nginx-v2.2.1\n",[262,321,323],{"id":322},"breaking-changes","Breaking changes",[325,326,327,343],"table",{},[328,329,330],"thead",{},[331,332,333,337,340],"tr",{},[334,335,336],"th",{},"Change",[334,338,339],{},"Likelihood of impact",[334,341,342],{},"You're affected if",[344,345,346,369,393,409,423,442,460,485],"tbody",{},[331,347,348,356,359],{},[349,350,351],"td",{},[352,353,355],"a",{"href":354},"#web-servers-listen-on-8080-and-8443","Web servers listen on 8080 and 8443",[349,357,358],{},"High",[349,360,361,362,365,366],{},"You use ",[270,363,364],{},"fpm-nginx"," or ",[270,367,368],{},"fpm-apache",[331,370,371,384,386],{},[349,372,373],{},[352,374,376,377,380,381],{"href":375},"#files-belong-to-www-data-not-webuser","Files belong to ",[270,378,379],{},"www-data",", not ",[270,382,383],{},"webuser",[349,385,358],{},[349,387,388,389,392],{},"You mount volumes or ",[270,390,391],{},"COPY"," files into the image",[331,394,395,401,403],{},[349,396,397],{},[352,398,400],{"href":399},"#debian-and-alpine-replace-ubuntu","Debian and Alpine replace Ubuntu",[349,402,358],{},[349,404,405,406],{},"Your Dockerfile runs Ubuntu commands or uses ",[270,407,408],{},"ppa:ondrej/php",[331,410,411,417,420],{},[349,412,413],{},[352,414,416],{"href":415},"#renamed-and-removed-variables","Renamed and removed variables",[349,418,419],{},"Medium",[349,421,422],{},"You set any of the variables listed",[331,424,425,437,439],{},[349,426,427],{},[352,428,430,433,434],{"href":429},"#autorun_enabled-defaults-to-false",[270,431,432],{},"AUTORUN_ENABLED"," defaults to ",[270,435,436],{},"false",[349,438,419],{},[349,440,441],{},"You rely on the Laravel automations",[331,443,444,455,457],{},[349,445,446],{},[352,447,449,433,452],{"href":448},"#ssl_mode-defaults-to-off",[270,450,451],{},"SSL_MODE",[270,453,454],{},"off",[349,456,419],{},[349,458,459],{},"You relied on HTTPS by default",[331,461,462,473,476],{},[349,463,464],{},[352,465,467,468,470,471],{"href":466},"#s6-overlay-only-in-fpm-nginx-and-fpm-apache","S6 Overlay only in ",[270,469,364],{}," and ",[270,472,368],{},[349,474,475],{},"Low",[349,477,478,479,365,482],{},"You added S6 services to ",[270,480,481],{},"cli",[270,483,484],{},"fpm",[331,486,487,493,495],{},[349,488,489],{},[352,490,492],{"href":491},"#msmtp-is-removed","MSMTP is removed",[349,494,475],{},[349,496,497],{},"Your app sends mail through MSMTP",[499,500,355],"h3",{"id":501},"web-servers-listen-on-8080-and-8443",[258,503,504,505,508,509,512,513,470,516,519,520,522],{},"Unprivileged users can't bind ports below 1024. NGINX and Apache now listen on ",[270,506,507],{},"8080"," for HTTP and ",[270,510,511],{},"8443"," for HTTPS. Update your port mappings, for example ",[270,514,515],{},"80:8080",[270,517,518],{},"443:8443",". See ",[352,521,36],{"href":37},".",[499,524,376,526,380,528],{"id":525},"files-belong-to-www-data-not-webuser",[270,527,379],{},[270,529,383],{},[258,531,532,533,535,536,539,540,542,543,546,547,550],{},"Version 2 ran as ",[270,534,383],{}," (UID ",[270,537,538],{},"9999",") with a login shell. Version 3 uses the ",[270,541,379],{}," user that ships with the official PHP images: UID and GID ",[270,544,545],{},"33"," on Debian and ",[270,548,549],{},"82"," on Alpine.",[552,553,554,564,570],"ul",{},[555,556,557,560,561,522],"li",{},[270,558,559],{},"chown"," mounted volumes on your hosts to match, for example ",[270,562,563],{},"33:33",[555,565,566,567,522],{},"Copy files with the right owner: ",[270,568,569],{},"COPY --chown=www-data:www-data . /var/www/html",[555,571,572,573,575,576,583],{},"To match your own UID in development, see ",[352,574,182],{"href":183},". For Docker Swarm host volumes, the ",[352,577,582],{"href":578,"rel":579,"target":581},"https://github.com/serversideup/docker-volume-change-permission-script",[580],"nofollow","_blank","change-volume-permissions script"," can help.",[499,585,400],{"id":586},"debian-and-alpine-replace-ubuntu",[258,588,589,590,592,593,596,597,519,600,522],{},"The images build on the official PHP images, which use Debian or Alpine. PHP comes from php.net instead of ",[270,591,408],{},". Remove Ubuntu-specific commands from your Dockerfile. Replace packages like ",[270,594,595],{},"php-redis"," with ",[270,598,599],{},"install-php-extensions",[352,601,602],{"href":171},"Installing additional PHP extensions",[499,604,416],{"id":605},"renamed-and-removed-variables",[325,607,608,618],{},[328,609,610],{},[331,611,612,615],{},[334,613,614],{},"v2",[334,616,617],{},"v3",[344,619,620,632,644,656,694,709],{},[331,621,622,627],{},[349,623,624],{},[270,625,626],{},"WEBUSER_HOME",[349,628,629],{},[270,630,631],{},"APP_BASE_DIR",[331,633,634,639],{},[349,635,636],{},[270,637,638],{},"DEBUG_OUTPUT",[349,640,641],{},[270,642,643],{},"LOG_OUTPUT_LEVEL=debug",[331,645,646,651],{},[349,647,648],{},[270,649,650],{},"PHP_POOL_NAME",[349,652,653],{},[270,654,655],{},"PHP_FPM_POOL_NAME",[331,657,658,676],{},[349,659,660,663,664,663,667,663,670,663,673],{},[270,661,662],{},"PHP_PM_CONTROL",", ",[270,665,666],{},"PHP_PM_MAX_CHILDREN",[270,668,669],{},"PHP_PM_START_SERVERS",[270,671,672],{},"PHP_PM_MIN_SPARE_SERVERS",[270,674,675],{},"PHP_PM_MAX_SPARE_SERVERS",[349,677,678,663,681,663,684,663,687,663,690,693],{},[270,679,680],{},"PHP_FPM_PM_CONTROL",[270,682,683],{},"PHP_FPM_PM_MAX_CHILDREN",[270,685,686],{},"PHP_FPM_PM_START_SERVERS",[270,688,689],{},"PHP_FPM_PM_MIN_SPARE_SERVERS",[270,691,692],{},"PHP_FPM_PM_MAX_SPARE_SERVERS",". The old names are ignored, so your PHP-FPM tuning is lost until you rename them.",[331,695,696,704],{},[349,697,698,663,701],{},[270,699,700],{},"PUID",[270,702,703],{},"PGID",[349,705,706,707,522],{},"Removed, because changing IDs at runtime needs root. See ",[352,708,182],{"href":183},[331,710,711,719],{},[349,712,713,663,716],{},[270,714,715],{},"MSMTP_RELAY_SERVER_HOSTNAME",[270,717,718],{},"MSMTP_RELAY_SERVER_PORT",[349,720,721],{},"Removed with MSMTP",[258,723,724,725,522],{},"Check every variable you set against the ",[352,726,727],{"href":243},"environment variable reference",[499,729,731,433,733],{"id":730},"autorun_enabled-defaults-to-false",[270,732,432],{},[270,734,436],{},[258,736,737,738,519,741,522],{},"The Laravel automations no longer run unless you set ",[270,739,740],{},"AUTORUN_ENABLED=true",[352,742,743],{"href":89},"Laravel automations",[499,745,747,433,749],{"id":746},"ssl_mode-defaults-to-off",[270,748,451],{},[270,750,454],{},[258,752,753,754,756,757,522],{},"The images serve HTTP only by default. Set ",[270,755,451],{}," to turn HTTPS on. See ",[352,758,142],{"href":143},[499,760,467,762,470,764],{"id":761},"s6-overlay-only-in-fpm-nginx-and-fpm-apache",[270,763,364],{},[270,765,368],{},[258,767,768,769,519,772,522],{},"The other variations don't include S6 Overlay. Move start-up scripts for them to ",[270,770,771],{},"/etc/entrypoint.d",[352,773,774],{"href":175},"Adding your own start-up scripts",[499,776,492],{"id":777},"msmtp-is-removed",[258,779,780],{},"MSMTP was removed for security and image size. Send mail through an external SMTP service. If you need MSMTP, install it in your own Dockerfile.",[262,782,784],{"id":783},"new-features","New features",[552,786,787,790,793,803,809,831],{},[555,788,789],{},"Built on the official PHP Docker images.",[555,791,792],{},"Runs as an unprivileged user by default.",[555,794,795,796,799,800,522],{},"Tags for an exact PHP patch, such as ",[270,797,798],{},"8.2.12"," instead of ",[270,801,802],{},"8.2",[555,804,805,806,808],{},"Start-up scripts in ",[270,807,771],{},", with no S6 Overlay knowledge needed.",[555,810,811,812,663,815,663,818,663,821,663,824,827,828,522],{},"Laravel automations for ",[270,813,814],{},"config:cache",[270,816,817],{},"route:cache",[270,819,820],{},"view:cache",[270,822,823],{},"event:cache",[270,825,826],{},"migrate --force --isolated",", and ",[270,829,830],{},"storage:link",[555,832,833],{},"Images published to GitHub Packages as well as Docker Hub.",[262,835,837],{"id":836},"if-your-ci-runs-builds-as-root","If your CI runs builds as root",[258,839,840,841,844,845,847,848,850,851,854,855,857,858,861,862,522],{},"Build a separate CI target that stays as ",[270,842,843],{},"root",". Keep ",[270,846,379],{}," for the image you deploy. When the container runs as root, the image sets PHP-FPM's worker user to ",[270,849,379],{}," for you (",[270,852,853],{},"PHP_FPM_CHILD_PROCESS_USER","). Start from the multi-stage Dockerfile in ",[352,856,182],{"href":183}," and add a ",[270,859,860],{},"ci"," target that sets ",[270,863,864],{},"USER root",[262,866,868],{"id":867},"migration-checklist","Migration checklist",[870,871,872,875,882,885,898,910,916],"ol",{},[555,873,874],{},"Test in a non-production environment first.",[555,876,877,878,470,880,522],{},"Update the image tag and the port mappings to ",[270,879,507],{},[270,881,511],{},[555,883,884],{},"Check every environment variable you set.",[555,886,887,888,890,891,827,893,596,895,522],{},"In your Dockerfile, remove Ubuntu commands and ",[270,889,408],{},", install extensions with ",[270,892,599],{},[270,894,391],{},[270,896,897],{},"--chown=www-data:www-data",[555,899,900,902,903,905,906,909],{},[270,901,559],{}," host volumes to ",[270,904,563],{}," (Debian) or ",[270,907,908],{},"82:82"," (Alpine).",[555,911,268,912,915],{},[270,913,914],{},"PHP_OPCACHE_ENABLE=1"," in production.",[555,917,918],{},"Deploy.",[920,921,922],"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":300,"depth":300,"links":924},[925,926,940,941,942],{"id":264,"depth":300,"text":265},{"id":322,"depth":300,"text":323,"children":927},[928,929,931,932,933,935,937,939],{"id":501,"depth":281,"text":355},{"id":525,"depth":281,"text":930},"Files belong to www-data, not webuser",{"id":586,"depth":281,"text":400},{"id":605,"depth":281,"text":416},{"id":730,"depth":281,"text":934},"AUTORUN_ENABLED defaults to false",{"id":746,"depth":281,"text":936},"SSL_MODE defaults to off",{"id":761,"depth":281,"text":938},"S6 Overlay only in fpm-nginx and fpm-apache",{"id":777,"depth":281,"text":492},{"id":783,"depth":300,"text":784},{"id":836,"depth":300,"text":837},{"id":867,"depth":300,"text":868},"The breaking changes and migration steps when you move from serversideup/php v2 to v3.","md",null,{"head":947,"layout":7},{"title":948},"Upgrade to v3 - Docker PHP - Server Side Up",true,{"title":203,"description":943},"LuNJHzf9tM3AAoQNEZjr5K1auILev3MLv9raoBSN-R0",[953,955],{"title":199,"path":200,"stem":201,"description":954,"children":-1},"What changed when serversideup/php moved from v3 to v4, and the defaults to check before you update your tag.",{"title":212,"path":213,"stem":214,"description":956,"children":-1},"Symptoms, causes, and fixes for the problems people hit most often with serversideup/php.",1793811956722]