[{"data":1,"prerenderedAt":999},["ShallowReactive",2],{"navigation":3,"/docs/customizing-the-image/adding-your-own-start-up-scripts":221,"/docs/customizing-the-image/adding-your-own-start-up-scripts-surround":994},[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":192,"body":223,"description":987,"extension":970,"links":988,"meta":989,"navigation":407,"path":193,"redirect":988,"seo":992,"stem":194,"__hash__":993},"docs/docs/6.customizing-the-image/3.adding-your-own-start-up-scripts.md",{"type":224,"value":225,"toc":978},"minimark",[226,244,249,275,289,293,300,313,317,322,328,342,346,353,544,561,565,572,634,650,654,660,775,780,802,812,816,838,933,943,954,957,974],[227,228,229],"lead-p",{},[230,231,232,233,238,239,243],"p",{},"We provide a few ",[234,235,237],"a",{"href":236},"/docs/getting-started/default-configurations#default-entrypoint-scripts","default entrypoint scripts"," to get you going, but sometimes you want to just add your own. We've made it easy to do that with our ",[240,241,242],"code",{},"entrypoint.d"," directory.",[245,246,248],"h2",{"id":247},"entrypoint-script-requirements","Entrypoint Script Requirements",[250,251,252,255],"note",{},[230,253,254],{},"Before you write your entry point script, be aware of the following requirements. Your script should:",[256,257,258,262,269],"ul",{},[259,260,261],"li",{},"Be executable (755 permissions)",[259,263,264,265,268],{},"Located in the ",[240,266,267],{},"/etc/entrypoint.d"," directory",[259,270,271,272],{},"Have the file extension ending in ",[240,273,274],{},".sh",[276,277,278],"tip",{},[230,279,280,281,284,285,288],{},"We recommend writing your script in ",[240,282,283],{},"/bin/sh"," for the best compatibility between Alpine and Debian. If you choose to use ",[240,286,287],{},"/bin/bash",", your script will only be able to run on Debian-based images.",[245,290,292],{"id":291},"choose-your-execution-order","Choose your execution order",[230,294,295,296,299],{},"Since ",[234,297,298],{"href":236},"we provide default entrypoint scripts",", you may want to choose the order in which your scripts are executed. We've made it easy to do that by prefixing your script with a number. The lower the number, the earlier it will be executed.",[276,301,302],{},[230,303,304,305,308,309,312],{},"If you want to disable our entrypoint scripts, you can set ",[240,306,307],{},"DISABLE_DEFAULT_CONFIG"," to ",[240,310,311],{},"true"," in your environment variables.",[245,314,316],{"id":315},"long-running-services","Long running services",[250,318,319],{},[230,320,321],{},"Don't use entrypoint scripts for long-running services. You want your services to be monitored and restarted if they crash.",[230,323,324,325,327],{},"Anything in the ",[240,326,267],{}," directory are scripts that are intended to run quickly and then move on. If you run a service as an entrypoint script, that service may crash and not be restarted.",[230,329,330,331,334,335,341],{},"Instead, learn about ",[234,332,333],{"href":168},"using S6 overlay"," so your services can be properly initialized and monitored. See the ",[234,336,340],{"href":337,"rel":338},"https://github.com/just-containers/s6-overlay",[339],"nofollow","S6 Overylay project"," for more details on how to write your own S6 service.",[245,343,345],{"id":344},"example-create-a-custom-entrypoint-script","Example: Create a custom entrypoint script",[230,347,348,349,352],{},"In this example, let's create a ",[240,350,351],{},"99-my-script.sh"," so it executes after all the other default scripts.",[354,355,357,386,424,510],"code-tree",{"default-value":356},"Dockerfile",[358,359,364],"pre",{"className":360,"code":361,"filename":362,"language":363,"meta":10,"style":10},"language-bash shiki shiki-themes github-dark","#!/bin/sh\necho \"👋 Hello, world!\"\n","entrypoint.d/99-my-script.sh","bash",[240,365,366,375],{"__ignoreMap":10},[367,368,371],"span",{"class":369,"line":370},"line",1,[367,372,374],{"class":373},"sAwPA","#!/bin/sh\n",[367,376,378,382],{"class":369,"line":377},2,[367,379,381],{"class":380},"sDLfK","echo",[367,383,385],{"class":384},"sU2Wk"," \"👋 Hello, world!\"\n",[358,387,391],{"className":388,"code":389,"filename":356,"language":390,"meta":10,"style":10},"language-dockerfile shiki shiki-themes github-dark","FROM serversideup/php:8.5-fpm-nginx\n\n# Copy our scripts as executable\nCOPY --chmod=755 ./entrypoint.d/ /etc/entrypoint.d/\n","dockerfile",[240,392,393,403,409,415],{"__ignoreMap":10},[367,394,395,399],{"class":369,"line":370},[367,396,398],{"class":397},"snl16","FROM",[367,400,402],{"class":401},"s95oV"," serversideup/php:8.5-fpm-nginx\n",[367,404,405],{"class":369,"line":377},[367,406,408],{"emptyLinePlaceholder":407},true,"\n",[367,410,412],{"class":369,"line":411},3,[367,413,414],{"class":373},"# Copy our scripts as executable\n",[367,416,418,421],{"class":369,"line":417},4,[367,419,420],{"class":397},"COPY",[367,422,423],{"class":401}," --chmod=755 ./entrypoint.d/ /etc/entrypoint.d/\n",[358,425,430],{"className":426,"code":427,"filename":428,"language":429,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  php:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    ports:\n      - 80:8080\n    volumes:\n      - .:/var/www/html\n","compose.yml","yml",[240,431,432,441,448,455,466,477,485,494,502],{"__ignoreMap":10},[367,433,434,438],{"class":369,"line":370},[367,435,437],{"class":436},"s4JwU","services",[367,439,440],{"class":401},":\n",[367,442,443,446],{"class":369,"line":377},[367,444,445],{"class":436},"  php",[367,447,440],{"class":401},[367,449,450,453],{"class":369,"line":411},[367,451,452],{"class":436},"    build",[367,454,440],{"class":401},[367,456,457,460,463],{"class":369,"line":417},[367,458,459],{"class":436},"      context",[367,461,462],{"class":401},": ",[367,464,465],{"class":380},".\n",[367,467,469,472,474],{"class":369,"line":468},5,[367,470,471],{"class":436},"      dockerfile",[367,473,462],{"class":401},[367,475,476],{"class":384},"Dockerfile\n",[367,478,480,483],{"class":369,"line":479},6,[367,481,482],{"class":436},"    ports",[367,484,440],{"class":401},[367,486,488,491],{"class":369,"line":487},7,[367,489,490],{"class":401},"      - ",[367,492,493],{"class":384},"80:8080\n",[367,495,497,500],{"class":369,"line":496},8,[367,498,499],{"class":436},"    volumes",[367,501,440],{"class":401},[367,503,505,507],{"class":369,"line":504},9,[367,506,490],{"class":401},[367,508,509],{"class":384},".:/var/www/html\n",[358,511,516],{"className":512,"code":513,"filename":514,"language":515,"meta":10,"style":10},"language-php shiki shiki-themes github-dark","\u003C?php\n// Let's just print out some PHP info\nphpinfo();\n?>\n","public/index.php","php",[240,517,518,526,531,539],{"__ignoreMap":10},[367,519,520,523],{"class":369,"line":370},[367,521,522],{"class":397},"\u003C?",[367,524,525],{"class":380},"php\n",[367,527,528],{"class":369,"line":377},[367,529,530],{"class":373},"// Let's just print out some PHP info\n",[367,532,533,536],{"class":369,"line":411},[367,534,535],{"class":380},"phpinfo",[367,537,538],{"class":401},"();\n",[367,540,541],{"class":369,"line":417},[367,542,543],{"class":397},"?>\n",[230,545,546,547,549,550,552,553,556,557,560],{},"In the example above, you can see in the ",[240,548,356],{}," we are copying our ",[240,551,242],{}," directory to ",[240,554,555],{},"/etc/entrypoint.d/"," in the container. We're also setting the permissions to ",[240,558,559],{},"755"," so our scripts are executable.",[245,562,564],{"id":563},"running-our-example","Running our example",[230,566,567,568,571],{},"When we run ",[240,569,570],{},"docker compose up",", we can confirm our script is executing by checking the logs:",[573,574,576],"code-panel",{"label":575},"Output of \"docker compose up\"",[358,577,581],{"className":578,"code":579,"language":580,"meta":10,"style":10},"language-txt shiki shiki-themes github-dark","php-1  | 👉 [NOTICE]: Improve PHP performance by setting PHP_OPCACHE_ENABLE=1 (recommended for production).\nphp-1  | (init-webserver-config): Processing /etc/nginx/nginx.conf.template → /etc/nginx/nginx.conf...\nphp-1  | (init-webserver-config): Processing /etc/nginx/site-opts.d/http.conf.template → /etc/nginx/site-opts.d/http.conf...\nphp-1  | (init-webserver-config): Processing /etc/nginx/site-opts.d/https.conf.template → /etc/nginx/site-opts.d/https.conf...\nphp-1  | ℹ️ NOTICE (init-webserver-config): Enabling NGINX site with SSL \"off\"...\nphp-1  | 👋 Hello, world!\nphp-1  | [03-Nov-2025 19:35:29] NOTICE: fpm is running, pid 93\nphp-1  | [03-Nov-2025 19:35:29] NOTICE: ready to handle connections\nphp-1  | HTTP Status Code: 200\nphp-1  | ✅ NGINX + PHP-FPM is running correctly.\n","txt",[240,582,583,588,593,598,603,608,613,618,623,628],{"__ignoreMap":10},[367,584,585],{"class":369,"line":370},[367,586,587],{},"php-1  | 👉 [NOTICE]: Improve PHP performance by setting PHP_OPCACHE_ENABLE=1 (recommended for production).\n",[367,589,590],{"class":369,"line":377},[367,591,592],{},"php-1  | (init-webserver-config): Processing /etc/nginx/nginx.conf.template → /etc/nginx/nginx.conf...\n",[367,594,595],{"class":369,"line":411},[367,596,597],{},"php-1  | (init-webserver-config): Processing /etc/nginx/site-opts.d/http.conf.template → /etc/nginx/site-opts.d/http.conf...\n",[367,599,600],{"class":369,"line":417},[367,601,602],{},"php-1  | (init-webserver-config): Processing /etc/nginx/site-opts.d/https.conf.template → /etc/nginx/site-opts.d/https.conf...\n",[367,604,605],{"class":369,"line":468},[367,606,607],{},"php-1  | ℹ️ NOTICE (init-webserver-config): Enabling NGINX site with SSL \"off\"...\n",[367,609,610],{"class":369,"line":479},[367,611,612],{},"php-1  | 👋 Hello, world!\n",[367,614,615],{"class":369,"line":487},[367,616,617],{},"php-1  | [03-Nov-2025 19:35:29] NOTICE: fpm is running, pid 93\n",[367,619,620],{"class":369,"line":496},[367,621,622],{},"php-1  | [03-Nov-2025 19:35:29] NOTICE: ready to handle connections\n",[367,624,625],{"class":369,"line":504},[367,626,627],{},"php-1  | HTTP Status Code: 200\n",[367,629,631],{"class":369,"line":630},10,[367,632,633],{},"php-1  | ✅ NGINX + PHP-FPM is running correctly.\n",[230,635,636,637,640,641,645,646,649],{},"You can see our ",[240,638,639],{},"👋 Hello, world!"," is executing ",[642,643,644],"em",{},"after"," the initialization of ",[240,647,648],{},"10-init-webserver-config.sh",".",[245,651,653],{"id":652},"running-custom-artisan-commands","Running Custom Artisan Commands",[230,655,656,657,659],{},"If you need to run a custom artisan command at start up, you could update your ",[240,658,362],{}," file to look like this:",[358,661,663],{"className":360,"code":662,"filename":362,"language":363,"meta":10,"style":10},"#!/bin/sh\n# Check if the artisan file exists\nif [ -f \"$APP_BASE_DIR/artisan\" ]; then\n  # Run the custom artisan command\n  php \"$APP_BASE_DIR/artisan\" my:custom-command\nelse\n  # If the artisan file is not found, stop the container\n  echo \"❌ Artisan file not found in $APP_BASE_DIR\"\n  exit 1\nfi\n\n# Exit with a success code\nexit 0\n",[240,664,665,669,674,700,705,719,724,729,742,750,755,760,766],{"__ignoreMap":10},[367,666,667],{"class":369,"line":370},[367,668,374],{"class":373},[367,670,671],{"class":369,"line":377},[367,672,673],{"class":373},"# Check if the artisan file exists\n",[367,675,676,679,682,685,688,691,694,697],{"class":369,"line":411},[367,677,678],{"class":397},"if",[367,680,681],{"class":401}," [ ",[367,683,684],{"class":397},"-f",[367,686,687],{"class":384}," \"",[367,689,690],{"class":401},"$APP_BASE_DIR",[367,692,693],{"class":384},"/artisan\"",[367,695,696],{"class":401}," ]; ",[367,698,699],{"class":397},"then\n",[367,701,702],{"class":369,"line":417},[367,703,704],{"class":373},"  # Run the custom artisan command\n",[367,706,707,710,712,714,716],{"class":369,"line":468},[367,708,445],{"class":709},"svObZ",[367,711,687],{"class":384},[367,713,690],{"class":401},[367,715,693],{"class":384},[367,717,718],{"class":384}," my:custom-command\n",[367,720,721],{"class":369,"line":479},[367,722,723],{"class":397},"else\n",[367,725,726],{"class":369,"line":487},[367,727,728],{"class":373},"  # If the artisan file is not found, stop the container\n",[367,730,731,734,737,739],{"class":369,"line":496},[367,732,733],{"class":380},"  echo",[367,735,736],{"class":384}," \"❌ Artisan file not found in ",[367,738,690],{"class":401},[367,740,741],{"class":384},"\"\n",[367,743,744,747],{"class":369,"line":504},[367,745,746],{"class":380},"  exit",[367,748,749],{"class":380}," 1\n",[367,751,752],{"class":369,"line":630},[367,753,754],{"class":397},"fi\n",[367,756,758],{"class":369,"line":757},11,[367,759,408],{"emptyLinePlaceholder":407},[367,761,763],{"class":369,"line":762},12,[367,764,765],{"class":373},"# Exit with a success code\n",[367,767,769,772],{"class":369,"line":768},13,[367,770,771],{"class":380},"exit",[367,773,774],{"class":380}," 0\n",[776,777,779],"h4",{"id":778},"best-practices-for-running-custom-artisan-commands","Best practices for running custom artisan commands",[256,781,782,789,792,795],{},[259,783,784,785,284,787,288],{},"Use ",[240,786,283],{},[240,788,287],{},[259,790,791],{},"Check to see if the artisan file exists before running the command",[259,793,794],{},"Exit with a success code",[259,796,797,798,801],{},"Name your file appropriately, so it executes in logic order with the other scripts (see our ",[234,799,800],{"href":236},"default configurations",")",[230,803,804,805,808,809,649],{},"You can change the name of your file to whatever you want, but we recommend using a number prefix to ensure it executes in the correct order. For example, if you want to run a command after the default scripts, you could name your file ",[240,806,807],{},"99-my-command.sh",". If you want to run a command before the default scripts, you could name your file ",[240,810,811],{},"1-my-command.sh",[245,813,815],{"id":814},"advanced-scenarios-s6-overlay-dependencies","Advanced Scenarios: S6 Overlay dependencies",[230,817,818,819,822,823,826,827,829,830,833,834,837],{},"If you want to customize an image that uses S6 Overlay (",[240,820,821],{},"fpm-nginx"," or ",[240,824,825],{},"fpm-apache","), you may have an advanced scenario where you have a custom S6 service that needs to be executed after one of our entrypoint scripts. In order to do this, you'll need to move all our scripts from the ",[240,828,267],{}," directory to the ",[240,831,832],{},"/etc/s6-overlay/scripts"," directory. This would be a very time consuming scenario if you did this manually, but thankfully you can use our ",[240,835,836],{},"docker-php-serversideup-s6-init"," script to do this for you.",[358,839,841],{"className":388,"code":840,"filename":356,"language":390,"meta":10,"style":10},"FROM serversideup/php:8.5-fpm-nginx\n\n# Set the user to root for our build steps\nUSER root\n\n# If you have your own one-shot scripts, copy them to the entrypoint.d directory\nCOPY --chmod=755 ./entrypoint.d/ /etc/entrypoint.d/\n\n# Copy our entrypoint scripts into the S6 Overlay scripts directory\nRUN docker-php-serversideup-s6-init\n\n# If you have your own long running services, copy them to the s6 directory\nCOPY --chmod=755 ./my-s6-service/ /etc/s6-overlay/s6-rc.d/my-s6-service/\n\n# Drop back to the non-root user\nUSER www-data\n",[240,842,843,849,853,858,866,870,875,881,885,890,898,902,907,914,919,925],{"__ignoreMap":10},[367,844,845,847],{"class":369,"line":370},[367,846,398],{"class":397},[367,848,402],{"class":401},[367,850,851],{"class":369,"line":377},[367,852,408],{"emptyLinePlaceholder":407},[367,854,855],{"class":369,"line":411},[367,856,857],{"class":373},"# Set the user to root for our build steps\n",[367,859,860,863],{"class":369,"line":417},[367,861,862],{"class":397},"USER",[367,864,865],{"class":401}," root\n",[367,867,868],{"class":369,"line":468},[367,869,408],{"emptyLinePlaceholder":407},[367,871,872],{"class":369,"line":479},[367,873,874],{"class":373},"# If you have your own one-shot scripts, copy them to the entrypoint.d directory\n",[367,876,877,879],{"class":369,"line":487},[367,878,420],{"class":397},[367,880,423],{"class":401},[367,882,883],{"class":369,"line":496},[367,884,408],{"emptyLinePlaceholder":407},[367,886,887],{"class":369,"line":504},[367,888,889],{"class":373},"# Copy our entrypoint scripts into the S6 Overlay scripts directory\n",[367,891,892,895],{"class":369,"line":630},[367,893,894],{"class":397},"RUN",[367,896,897],{"class":401}," docker-php-serversideup-s6-init\n",[367,899,900],{"class":369,"line":757},[367,901,408],{"emptyLinePlaceholder":407},[367,903,904],{"class":369,"line":762},[367,905,906],{"class":373},"# If you have your own long running services, copy them to the s6 directory\n",[367,908,909,911],{"class":369,"line":768},[367,910,420],{"class":397},[367,912,913],{"class":401}," --chmod=755 ./my-s6-service/ /etc/s6-overlay/s6-rc.d/my-s6-service/\n",[367,915,917],{"class":369,"line":916},14,[367,918,408],{"emptyLinePlaceholder":407},[367,920,922],{"class":369,"line":921},15,[367,923,924],{"class":373},"# Drop back to the non-root user\n",[367,926,928,930],{"class":369,"line":927},16,[367,929,862],{"class":397},[367,931,932],{"class":401}," www-data\n",[230,934,935,936,938,939,942],{},"In the above file, we're copying our \"one-shot\" scripts to the ",[240,937,267],{}," directory and our long running services to the ",[240,940,941],{},"/etc/s6-overlay"," directory. One-shot scripts are scripts that are intended to run quickly and then move on. Long running services are services that are intended to run for a long time and need to be monitored and restarted if they crash.",[230,944,945,946,948,949,829,951,953],{},"The magic happens when we run ",[240,947,836],{},". This script will move all our scripts from the ",[240,950,267],{},[240,952,832],{}," directory and set the correct dependencies for our S6 services.",[230,955,956],{},"You can now reference our script names as dependencies in your own S6 service.",[958,959],"u-button",{"ariaLabel":960,"className":961,"color":969,"label":960,"size":970,"target":971,"to":337,"trailing-icon":972,"variant":973},"Learn more about S6 Overlay",[962,963,964,965,966,967,968],"font-bold","ring","ring-inset","ring-blue-600","text-blue-600","hover:ring-blue-500","hover:text-blue-500","primary","md","_blank","i-lucide-arrow-right","outline",[975,976,977],"style",{},"html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}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);}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 pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}",{"title":10,"searchDepth":377,"depth":377,"links":979},[980,981,982,983,984,985,986],{"id":247,"depth":377,"text":248},{"id":291,"depth":377,"text":292},{"id":315,"depth":377,"text":316},{"id":344,"depth":377,"text":345},{"id":563,"depth":377,"text":564},{"id":652,"depth":377,"text":653},{"id":814,"depth":377,"text":815},"Learn how to use our entrypoint.d directory to customize your container start up experience.",null,{"head":990,"layout":7},{"title":991},"Adding your own start up scripts - Docker PHP - Server Side Up",{"title":192,"description":987},"h6ZC9XSDti7e5_IGR4a48DOosnbjUciUqPO26Za25qk",[995,997],{"title":188,"path":189,"stem":190,"description":996,"children":-1},"Learn how to add any PHP extension that you need for your application.",{"title":201,"path":202,"stem":203,"description":998,"children":-1},"Solutions to frequently encountered problems when using serversideup/php Docker images.",1776367058607]