├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .gitattributes ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── documentation.md │ ├── feature_request.md │ ├── misc.md │ └── security.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build-php-images.yml │ ├── label-add-to-project.yml │ ├── pr-docs-tests.yml │ ├── pr-linter.yml │ ├── pr-php-tests.yml │ ├── pr-unit-tests.yml │ └── release.yml ├── .gitignore ├── .lando.yml ├── .node-version ├── .npmignore ├── CHANGELOG.md ├── LICENSE.md ├── PRIVACY.md ├── README.md ├── builders ├── php-nginx.js └── php.js ├── config ├── default-ssl.conf ├── default-ssl.conf.tpl ├── default.conf ├── default.conf.tpl ├── php.ini └── zz-lando.conf ├── docs ├── .eslintrc.json ├── .vitepress │ ├── config.mjs │ └── theme │ │ └── index.mjs ├── caveats.md ├── config.md ├── development.md ├── extensions.md ├── guides.md ├── guides │ ├── accessing-logs.md │ ├── installing-extensions.md │ └── installing-node.md ├── index.md ├── install.md ├── public │ ├── contact.html │ ├── favicon.ico │ ├── favicon.svg │ └── images │ │ ├── icon.png │ │ ├── icon.svg │ │ ├── logo.png │ │ ├── logo.svg │ │ └── phpicon.png ├── support.md ├── team.md └── v │ └── index.md ├── examples ├── .gitkeep ├── 5.6 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 7.0 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 7.1 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 7.2 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 7.3 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 7.4 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 8.0 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 8.1 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 8.2 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 8.3 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── 8.4 │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ └── php.ini │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── composer │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ └── index.php ├── custom │ ├── .gitignore │ ├── .lando.yml │ ├── Dockerfile.node │ ├── README.md │ ├── config │ │ ├── apache.conf │ │ ├── nginx.conf │ │ ├── php.ini │ │ └── www.conf │ ├── index.php │ ├── path_info.php │ └── web │ │ ├── index.php │ │ └── path_info.php ├── php-extensions │ ├── .gitignore │ ├── .lando.yml │ ├── Dockerfile.custom │ ├── README.md │ └── index.php └── xdebug │ ├── .gitignore │ ├── .lando.yml │ ├── README.md │ └── index.php ├── images ├── 5.6-apache │ └── Dockerfile ├── 5.6-fpm │ └── Dockerfile ├── 7.0-apache │ └── Dockerfile ├── 7.0-fpm │ └── Dockerfile ├── 7.1-apache │ └── Dockerfile ├── 7.1-fpm │ └── Dockerfile ├── 7.2-apache │ └── Dockerfile ├── 7.2-fpm │ └── Dockerfile ├── 7.3-apache │ └── Dockerfile ├── 7.3-fpm │ └── Dockerfile ├── 7.4-apache │ └── Dockerfile ├── 7.4-fpm │ └── Dockerfile ├── 8.0-apache │ └── Dockerfile ├── 8.0-fpm │ └── Dockerfile ├── 8.1-apache │ └── Dockerfile ├── 8.1-fpm │ └── Dockerfile ├── 8.2-apache │ └── Dockerfile ├── 8.2-fpm │ └── Dockerfile ├── 8.3-apache │ └── Dockerfile ├── 8.3-fpm │ └── Dockerfile ├── 8.4-apache │ └── Dockerfile └── 8.4-fpm │ └── Dockerfile ├── index.js ├── netlify.toml ├── package-lock.json ├── package.json ├── plugin.yml ├── scripts └── install-composer.sh ├── test └── auth.spec.js └── utils ├── add-build-step.js ├── clone-overrides.js └── get-install-commands.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | charset = utf-8 9 | 10 | [*.js] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | temp 2 | cache 3 | dist 4 | _site 5 | !.vitepress 6 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "mocha": true, 5 | "es2021": true 6 | }, 7 | "parser": "@babel/eslint-parser", 8 | "parserOptions": { 9 | "sourceType": "module", 10 | "ecmaVersion": 8, 11 | "requireConfigFile": false 12 | }, 13 | "extends": [ 14 | "eslint:recommended", 15 | "google" 16 | ], 17 | "rules": { 18 | "arrow-parens": ["error", 19 | "as-needed" 20 | ], 21 | "max-len": ["error", { 22 | "code": 140, 23 | "ignoreComments": true 24 | }], 25 | "no-empty": ["error", { 26 | "allowEmptyCatch": true 27 | }], 28 | "no-unused-vars": ["error", { 29 | "vars": "all", 30 | "args": "after-used", 31 | "ignoreRestSiblings": false 32 | }], 33 | 34 | "require-jsdoc": ["error", { 35 | "require": { 36 | "FunctionDeclaration": true, 37 | "MethodDefinition": false, 38 | "ClassDeclaration": false, 39 | "ArrowFunctionExpression": false, 40 | "FunctionExpression": false 41 | } 42 | }] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Declare files that will always have LF line endings on checkout. 5 | *.js text eol=lf 6 | *.sh text eol=lf 7 | *.conf text eol=lf 8 | *.cnf text eol=lf 9 | *.ini text eol=lf 10 | *.php text eol=lf 11 | *.vcl text eol=lf 12 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [lando, pirog] 4 | patreon: devwithlando 5 | open_collective: devwithlando 6 | custom: https://lando.dev/join 7 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug 3 | about: Create a bug report to help us improve this plugin 4 | labels: bug 5 | --- 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Docs 3 | about: Suggest a documentation change or improvement 4 | labels: docs 5 | --- 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature 3 | about: Suggest an idea for this project 4 | labels: feature 5 | --- 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/misc.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Misc 3 | about: Create basically every other kind of issue 4 | labels: task 5 | --- 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/security.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Security 3 | about: Create a security issue 4 | labels: security 5 | --- 6 | 7 | **DO NOT SUBMIT A SECURITY ISSUE HERE!** 8 | 9 | If you have discovered a security issue with Lando, please contact the Lando Security Team directly at [security@devwithlando.io](mailto:security@devwithlando.io). 10 | 11 | We manage security issues separately in a private repository until the issue has been resolved. Even if you're not sure if it's a security problem, please contact the security team before filing an issue, blogging, or tweeting about it. 12 | 13 | **DO NOT SUBMIT A SECURITY ISSUE HERE!** 14 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Bare minimum self-checks 2 | 3 | > [What do you think of a person who only does the bare minimum?](https://getyarn.io/yarn-clip/dcf80710-425e-478b-bde1-c107bd11e849) 4 | 5 | - [ ] I've updated this PR with the latest code from `main` 6 | - [ ] I've done a cursory QA pass of my code locally 7 | - [ ] I've ensured all automated status check and tests pass 8 | - [ ] I've [connected this PR to an issue](https://help.zenhub.com/support/solutions/articles/43000010350-connecting-pull-requests-to-github-issues) 9 | 10 | ### Pieces of flare 11 | 12 | - [ ] I've written a unit or functional test for my code 13 | - [ ] I've updated relevant documentation it my code changes it 14 | - [ ] I've updated this repo's README if my code changes it 15 | - [ ] I've updated this repo's CHANGELOG with my change unless its a trivial change (like updating a typo in the docs) 16 | 17 | ### Finally 18 | 19 | - [ ] I've [requested a review](https://help.github.com/en/articles/requesting-a-pull-request-review) with relevant people 20 | 21 | If you have any issues or need help please join the `#contributors` channel in the [Lando slack](https://www.launchpass.com/devwithlando) and someone will gladly help you out! 22 | 23 | You can also check out the [coder guide](https://docs.lando.dev/contrib/coder.html). 24 | -------------------------------------------------------------------------------- /.github/workflows/build-php-images.yml: -------------------------------------------------------------------------------- 1 | name: Build PHP Images 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - 'images/**' 7 | - '.github/workflows/build-php-images.yml' 8 | push: 9 | branches: 10 | - main 11 | paths: 12 | - 'images/**' 13 | - '.github/workflows/build-php-images.yml' 14 | workflow_dispatch: 15 | 16 | jobs: 17 | buildx: 18 | runs-on: ubuntu-24.04 19 | env: 20 | TERM: xterm 21 | strategy: 22 | fail-fast: false 23 | matrix: 24 | include: 25 | - image: php 26 | tag: 8.4-fpm-5 27 | context: images/8.4-fpm 28 | - image: php 29 | tag: 8.4-apache-5 30 | context: images/8.4-apache 31 | - image: php 32 | tag: 8.3-fpm-5 33 | context: images/8.3-fpm 34 | - image: php 35 | tag: 8.3-apache-5 36 | context: images/8.3-apache 37 | - image: php 38 | tag: 8.2-fpm-5 39 | context: images/8.2-fpm 40 | - image: php 41 | tag: 8.2-apache-5 42 | context: images/8.2-apache 43 | - image: php 44 | tag: 8.1-fpm-5 45 | context: images/8.1-fpm 46 | - image: php 47 | tag: 8.1-apache-5 48 | context: images/8.1-apache 49 | - image: php 50 | tag: 8.0-fpm-5 51 | context: images/8.0-fpm 52 | - image: php 53 | tag: 8.0-apache-5 54 | context: images/8.0-apache 55 | - image: php 56 | tag: 7.4-fpm-5 57 | context: images/7.4-fpm 58 | - image: php 59 | tag: 7.4-apache-5 60 | context: images/7.4-apache 61 | - image: php 62 | tag: 7.3-fpm-5 63 | context: images/7.3-fpm 64 | - image: php 65 | tag: 7.3-apache-5 66 | context: images/7.3-apache 67 | - image: php 68 | tag: 7.2-fpm-5 69 | context: images/7.2-fpm 70 | - image: php 71 | tag: 7.2-apache-5 72 | context: images/7.2-apache 73 | - image: php 74 | tag: 7.1-fpm-5 75 | context: images/7.1-fpm 76 | - image: php 77 | tag: 7.1-apache-5 78 | context: images/7.1-apache 79 | - image: php 80 | tag: 7.0-fpm-5 81 | context: images/7.0-fpm 82 | - image: php 83 | tag: 7.0-apache-5 84 | context: images/7.0-apache 85 | - image: php 86 | tag: 5.6-fpm-5 87 | context: images/5.6-fpm 88 | - image: php 89 | tag: 5.6-apache-5 90 | context: images/5.6-apache 91 | 92 | steps: 93 | - name: Checkout code 94 | uses: actions/checkout@v4 95 | - name: Set up QEMU 96 | uses: docker/setup-qemu-action@v3 97 | - name: Set up Docker Buildx 98 | uses: docker/setup-buildx-action@v3 99 | - name: Set tag suffix 100 | id: release 101 | if: ${{ github.event_name == 'pull_request' }} 102 | run: echo "tag_suffix=-edge" >> "$GITHUB_OUTPUT" 103 | # Build our images. 104 | - name: Login to DockerHub 105 | uses: docker/login-action@v3 106 | with: 107 | username: ${{ secrets.DOCKERHUB_USERNAME }} 108 | password: ${{ secrets.DOCKERHUB_TOKEN }} 109 | - name: Build and push devwithlando/${{ matrix.image }}:${{ matrix.tag }}${{ steps.release.outputs.tag_suffix }} 110 | uses: docker/build-push-action@v6 111 | with: 112 | context: ${{ matrix.context }} 113 | platforms: linux/amd64,linux/arm64 114 | push: true 115 | tags: devwithlando/${{ matrix.image }}:${{ matrix.tag }}${{ steps.release.outputs.tag_suffix }} 116 | cache-from: type=gha,scope=${{ matrix.image }}-${{ matrix.tag }} 117 | cache-to: type=gha,mode=max,scope=${{ matrix.image }}-${{ matrix.tag }} 118 | -------------------------------------------------------------------------------- /.github/workflows/label-add-to-project.yml: -------------------------------------------------------------------------------- 1 | name: Add to Contrib Project 2 | 3 | on: 4 | issues: 5 | types: [labeled] 6 | pull_request: 7 | types: [labeled] 8 | 9 | jobs: 10 | add_to_project: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Add issue/PR to GitHub Project 14 | if: github.event.label.name == 'flag' 15 | uses: actions/add-to-project@v1.0.0 16 | with: 17 | project-url: https://github.com/orgs/lando/projects/7 18 | github-token: ${{ secrets.SHADOW_COUNCIL_ESCALATOR }} 19 | labeled: flag 20 | -------------------------------------------------------------------------------- /.github/workflows/pr-docs-tests.yml: -------------------------------------------------------------------------------- 1 | name: Run Docs Tests 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | docs-tests: 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | matrix: 11 | os: 12 | - ubuntu-24.04 13 | node-version: 14 | - '20' 15 | steps: 16 | # Install deps and cache 17 | - name: Checkout code 18 | uses: actions/checkout@v4 19 | - name: Cache version builds 20 | uses: actions/cache@v4 21 | with: 22 | key: lando-mvb-docs 23 | path: docs/.vitepress/cache/@lando/mvb 24 | save-always: true 25 | - name: Install node ${{ matrix.node-version }} 26 | uses: actions/setup-node@v4 27 | with: 28 | node-version: ${{ matrix.node-version }} 29 | cache: npm 30 | - name: Install NPM dependencies 31 | run: npm clean-install --prefer-offline --frozen-lockfile 32 | 33 | # Run tests 34 | - name: Run linter 35 | run: npm run lint 36 | - name: Test mvb 37 | run: npm run docs:mvb 38 | - name: Test build 39 | run: npm run docs:build 40 | -------------------------------------------------------------------------------- /.github/workflows/pr-linter.yml: -------------------------------------------------------------------------------- 1 | name: Lint Code 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | lint: 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | matrix: 11 | os: 12 | - ubuntu-24.04 13 | node-version: 14 | - '20' 15 | steps: 16 | # Install deps and cache 17 | - name: Checkout code 18 | uses: actions/checkout@v4 19 | - name: Install node ${{ matrix.node-version }} 20 | uses: actions/setup-node@v4 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | cache: npm 24 | - name: Install NPM dependencies 25 | run: npm clean-install --prefer-offline --frozen-lockfile 26 | 27 | # Run the linter 28 | - name: Run code linter 29 | run: npm run lint 30 | -------------------------------------------------------------------------------- /.github/workflows/pr-php-tests.yml: -------------------------------------------------------------------------------- 1 | name: PHP Tests 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | leia-tests: 8 | runs-on: ${{ matrix.os }} 9 | env: 10 | TERM: xterm 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | leia-test: 15 | - examples/5.6 16 | - examples/7.0 17 | - examples/7.1 18 | - examples/7.2 19 | - examples/7.3 20 | - examples/7.4 21 | - examples/8.0 22 | - examples/8.1 23 | - examples/8.2 24 | - examples/8.3 25 | - examples/8.4 26 | - examples/custom 27 | - examples/composer 28 | - examples/php-extensions 29 | - examples/xdebug 30 | lando-version: 31 | - 3-edge 32 | - 3-stable 33 | os: 34 | - ubuntu-24.04 35 | node-version: 36 | - '20' 37 | steps: 38 | - name: Checkout code 39 | uses: actions/checkout@v4 40 | - name: Install node ${{ matrix.node-version }} 41 | uses: actions/setup-node@v4 42 | with: 43 | node-version: ${{ matrix.node-version }} 44 | registry-url: https://registry.npmjs.org 45 | cache: npm 46 | - name: Install NPM dependencies 47 | run: npm clean-install --production --prefer-offline --frozen-lockfile 48 | - name: Bundle Deps 49 | uses: lando/prepare-release-action@v3 50 | with: 51 | lando-plugin: true 52 | version: dev 53 | sync: false 54 | - name: Setup lando ${{ matrix.lando-version }} 55 | uses: lando/setup-lando@v3 56 | with: 57 | lando-version: ${{ matrix.lando-version }} 58 | config: | 59 | setup.skipCommonPlugins=true 60 | setup.plugins.@lando/php=/home/runner/work/php/php 61 | telemetry: false 62 | - name: Run Leia Tests 63 | uses: lando/run-leia-action@v2 64 | with: 65 | leia-test: "./${{ matrix.leia-test }}/README.md" 66 | cleanup-header: "Destroy tests" 67 | shell: bash 68 | stdin: true 69 | -------------------------------------------------------------------------------- /.github/workflows/pr-unit-tests.yml: -------------------------------------------------------------------------------- 1 | name: Run Unit Tests 2 | 3 | on: 4 | pull_request: 5 | 6 | jobs: 7 | unit-tests: 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | matrix: 11 | os: 12 | - windows-2022 13 | - ubuntu-24.04 14 | - macos-14 15 | node-version: 16 | - '20' 17 | steps: 18 | # Install deps and cache 19 | - name: Checkout code 20 | uses: actions/checkout@v4 21 | - name: Install node ${{ matrix.node-version }} 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: ${{ matrix.node-version }} 25 | cache: npm 26 | - name: Install NPM dependencies 27 | run: npm clean-install --prefer-offline --frozen-lockfile 28 | - name: Bundle Deps 29 | uses: lando/prepare-release-action@v3 30 | with: 31 | lando-plugin: true 32 | version: dev 33 | sync: false 34 | 35 | # Run unit tests 36 | - name: Run unit tests 37 | run: npm run test:unit 38 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Publish to NPM 2 | 3 | on: 4 | release: 5 | types: 6 | - published 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ${{ matrix.os }} 11 | env: 12 | TERM: xterm 13 | strategy: 14 | matrix: 15 | os: 16 | - ubuntu-24.04 17 | node-version: 18 | - '20' 19 | steps: 20 | # Install deps and cache 21 | - name: Checkout code 22 | uses: actions/checkout@v4 23 | - name: Install node ${{ matrix.node-version }} 24 | uses: actions/setup-node@v4 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | registry-url: https://registry.npmjs.org 28 | cache: npm 29 | - name: Install dependencies 30 | run: npm clean-install --prefer-offline --frozen-lockfile 31 | 32 | # Let's do tests rq just to make sure we dont push something that is fundamentally broken 33 | - name: Lint code 34 | run: npm run lint 35 | - name: Run unit tests 36 | run: npm run test:unit 37 | 38 | # Prepare release. 39 | - name: Prepare release 40 | uses: lando/prepare-release-action@v3 41 | with: 42 | lando-plugin: true 43 | sync-email: rtfm47@lando.dev 44 | sync-token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }} 45 | sync-username: rtfm-47 46 | 47 | # Deploy 48 | - name: Publish to npm 49 | run: | 50 | VERSION=$(node -p "require('./package.json').version") 51 | PACKAGE=$(node -p "require('./package.json').name") 52 | 53 | if [ "${{ github.event.release.prerelease }}" == "false" ]; then 54 | npm publish --access public --dry-run 55 | npm publish --access public 56 | npm dist-tag add "$PACKAGE@$VERSION" edge 57 | 58 | echo "::notice title=Published $VERSION to $PACKAGE::This is a stable release published to the default 'latest' npm tag" 59 | echo "::notice title=Updated latest tag to $VERSION::The stable tag now points to $VERSION" 60 | echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION" 61 | else 62 | npm publish --access public --tag edge --dry-run 63 | npm publish --access public --tag edge 64 | 65 | echo "::notice title=Published $VERSION to $PACKAGE::This is a prerelease published to the 'edge' npm tag" 66 | echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION" 67 | fi 68 | env: 69 | NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}} 70 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Common sys files 2 | .*.swp 3 | ._* 4 | .git 5 | .hg 6 | .sign 7 | .lock-wscript 8 | .svn 9 | .wafpickle-* 10 | .DS_Store 11 | .idea/ 12 | *.tar 13 | *.jxp 14 | *.sublime-* 15 | 16 | # Logs 17 | *.log 18 | logs 19 | 20 | # NPM files 21 | node_modules 22 | 23 | # lando config 24 | env.yaml 25 | env.yml 26 | lando.env 27 | 28 | # Build dirs 29 | build 30 | dist 31 | 32 | # coverage reporting 33 | .nyc_output 34 | coverage/ 35 | 36 | # docs 37 | .temp 38 | .cache 39 | _site 40 | dist 41 | cache 42 | temp 43 | config.*.timestamp-*-*.* 44 | 45 | # YARN 46 | yarn.lock 47 | -------------------------------------------------------------------------------- /.lando.yml: -------------------------------------------------------------------------------- 1 | name: docs.php 2 | proxy: 3 | cli: 4 | - docs.php.lndo.site:5173 5 | services: 6 | cli: 7 | api: 4 8 | image: node:18 9 | command: sleep infinity 10 | ports: 11 | - 5173:5173/http 12 | scanner: false 13 | user: node 14 | build: 15 | app: | 16 | npm install 17 | tooling: 18 | node: 19 | service: cli 20 | npm: 21 | service: cli 22 | vitepress: 23 | service: cli 24 | cmd: npx vitepress 25 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 20 2 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .github 2 | .nyc_output 3 | coverage 4 | docs 5 | examples 6 | guides 7 | test 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PHP Lando Plugin 2 | 3 | This is the _official_ [Lando](https://lando.dev) plugin for [PHP](https://php.net). When installed it... 4 | 5 | * Allows users to run various `php` versions 6 | * Serves applications over `nginx` or `apache` 7 | * Runs in `cli` mode 8 | * Comes with easy `composer` support 9 | 10 | Of course, once a user is running their PHP project with Lando they can take advantage of [all the other awesome development features](https://docs.lando.dev) Lando provides. 11 | 12 | ## Basic Usage 13 | 14 | Add a `php` service to your Landofile 15 | 16 | ```yaml 17 | services: 18 | myservice: 19 | type: php:8.1 20 | via: nginx 21 | webroot: www 22 | ``` 23 | 24 | For more info you should check out the [docs](https://docs.lando.dev/php): 25 | 26 | * [Getting Started](https://docs.lando.dev/php/) 27 | * [Configuration](https://docs.lando.dev/php/config.html) 28 | * [Guides](https://docs.lando.dev/php/accessing-logs.html) 29 | * [Examples](https://github.com/lando/php/tree/main/examples) 30 | * [Development](https://docs.lando.dev/php/development.html) 31 | 32 | ## Issues, Questions and Support 33 | 34 | If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando). 35 | 36 | If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/php/issues/new/choose) in this repo. 37 | 38 | ## Changelog 39 | 40 | We try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/php/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/php/releases). 41 | 42 | ## Maintainers 43 | 44 | * [@pirog](https://github.com/pirog) 45 | * [@reynoldsalec](https://github.com/reynoldsalec) 46 | 47 | ## Contributors 48 | 49 | 50 | 51 | 52 | 53 | Made with [contributors-img](https://contrib.rocks). 54 | 55 | ## Other Selected Resources 56 | 57 | * [LICENSE](https://github.com/lando/php/blob/main/LICENSE.md) 58 | * [The best professional advice ever](https://www.youtube.com/watch?v=tkBVDh7my9Q) 59 | -------------------------------------------------------------------------------- /builders/php-nginx.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const _ = require('lodash'); 4 | const LandoNginx = require('@lando/nginx/builders/nginx.js'); 5 | 6 | // Builder 7 | module.exports = { 8 | name: 'php-nginx', 9 | parent: '_webserver', 10 | builder: parent => class PhpNginx extends LandoNginx.builder(parent, LandoNginx.config) { 11 | constructor(id, options = {}) { 12 | super(id, options, {services: _.set({}, options.name)}); 13 | } 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /config/default-ssl.conf.tpl: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | location ~ \.php$ { 20 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /config/default.conf: -------------------------------------------------------------------------------- 1 | 2 | # WHAT IN THE WORLD HAPPENED TO YOU 3 | # The ServerName directive sets the request scheme, hostname and port that 4 | # the server uses to identify itself. This is used when creating 5 | # redirection URLs. In the context of virtual hosts, the ServerName 6 | # specifies what hostname must appear in the request's Host: header to 7 | # match this virtual host. For the default virtual host (this file) this 8 | # value is not decisive as it is used as a last resort host regardless. 9 | # However, you must set it for any further virtual host explicitly. 10 | ServerName appserver 11 | 12 | ServerAdmin webmaster@localhost 13 | DocumentRoot ${LANDO_WEBROOT} 14 | 15 | Options Indexes FollowSymLinks 16 | AllowOverride All 17 | Order allow,deny 18 | Allow from all 19 | Require all granted 20 | 21 | 22 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 23 | # error, crit, alert, emerg. 24 | # It is also possible to configure the loglevel for particular 25 | # modules, e.g. 26 | #LogLevel info ssl:warn 27 | 28 | ErrorLog ${APACHE_LOG_DIR}/error.log 29 | CustomLog ${APACHE_LOG_DIR}/access.log combined 30 | 31 | # For most configuration files from conf-available/, which are 32 | # enabled or disabled at a global level, it is possible to 33 | # include a line for only one particular virtual host. For example the 34 | # following line enables the CGI configuration for this host only 35 | # after it has been globally disabled with "a2disconf". 36 | #Include conf-available/serve-cgi-bin.conf 37 | 38 | # Pass some common ENVs, its ok if this fails 39 | SetEnv BACKDROP_SETTINGS ${BACKDROP_SETTINGS} 40 | 41 | 42 | -------------------------------------------------------------------------------- /config/default.conf.tpl: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80 default ipv6only=on; 4 | server_name localhost; 5 | 6 | root "{{LANDO_WEBROOT}}"; 7 | index index.php index.html index.htm; 8 | 9 | location ~ \.php$ { 10 | fastcgi_split_path_info ^(.+?\.php)(/.*)$; 11 | fastcgi_pass fpm:9000; 12 | fastcgi_index index.php; 13 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 14 | fastcgi_buffers 256 128k; 15 | fastcgi_connect_timeout 300s; 16 | fastcgi_send_timeout 300s; 17 | fastcgi_read_timeout 300s; 18 | include fastcgi_params; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | ;;;;;;;;;;;;;;; 4 | ; PHP Globals ; 5 | ;;;;;;;;;;;;;;; 6 | 7 | short_open_tag = Off 8 | output_buffering = 4096 9 | allow_call_time_pass_reference = Off 10 | request_order = "GP" 11 | register_long_arrays = Off 12 | register_argc_argv = Off 13 | magic_quotes_gpc = Off 14 | enable_dl = Off 15 | allow_url_fopen = On 16 | realpath_cache_size = "800K" 17 | realpath_cache_ttl = "86400" 18 | disable_functions = 19 | sendmail_path=/bin/true 20 | 21 | [Date] 22 | date.timezone = "UTC" 23 | 24 | ;;;;;;;;;;;;;;;;;;;;;; 25 | ;; PACKAGE SETTINGS ;; 26 | ;;;;;;;;;;;;;;;;;;;;;; 27 | 28 | ; Xdebug 29 | xdebug.max_nesting_level = 512 30 | xdebug.remote_autostart = 1 31 | xdebug.start_with_request = trigger 32 | xdebug.mode = ${XDEBUG_MODE} 33 | 34 | ; Globals 35 | expose_php = on 36 | max_execution_time = 90 37 | max_input_time = 900 38 | max_input_vars = 10000 39 | memory_limit = ${PHP_MEMORY_LIMIT} 40 | upload_max_filesize = 100M 41 | post_max_size = 100M 42 | error_reporting = E_ALL & ~E_DEPRECATED 43 | ignore_repeated_errors = on 44 | html_errors = off 45 | display_errors = on 46 | log_errors = on 47 | -------------------------------------------------------------------------------- /config/zz-lando.conf: -------------------------------------------------------------------------------- 1 | [www] 2 | user = root 3 | group = root 4 | -------------------------------------------------------------------------------- /docs/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@babel/eslint-parser", 3 | "parserOptions": { 4 | "sourceType": "module", 5 | "ecmaVersion": 8, 6 | "requireConfigFile": false 7 | }, 8 | "extends": [ 9 | "plugin:vue/recommended", 10 | "google" 11 | ], 12 | "root": true, 13 | "rules": { 14 | "linebreak-style": 0, 15 | "arrow-parens": ["error", 16 | "as-needed" 17 | ], 18 | "max-len": ["error", { 19 | "code": 12000, 20 | "ignoreComments": true 21 | }], 22 | "require-jsdoc": ["error", { 23 | "require": { 24 | "FunctionDeclaration": false, 25 | "MethodDefinition": false, 26 | "ClassDeclaration": false, 27 | "ArrowFunctionExpression": false, 28 | "FunctionExpression": false 29 | } 30 | }] 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /docs/.vitepress/config.mjs: -------------------------------------------------------------------------------- 1 | import {createRequire} from 'module'; 2 | 3 | import {defineConfig} from '@lando/vitepress-theme-default-plus/config'; 4 | 5 | const require = createRequire(import.meta.url); 6 | 7 | const {name, version} = require('../../package.json'); 8 | const landoPlugin = name.replace('@lando/', ''); 9 | 10 | export default defineConfig({ 11 | title: 'Lando PHP Plugin', 12 | description: 'The offical Lando plugin for Php.', 13 | landoDocs: 3, 14 | landoPlugin, 15 | version, 16 | head: [ 17 | ['meta', {name: 'viewport', content: 'width=device-width, initial-scale=1'}], 18 | ['link', {rel: 'icon', href: '/php/favicon.ico', size: 'any'}], 19 | ['link', {rel: 'icon', href: '/php/favicon.svg', type: 'image/svg+xml'}], 20 | ], 21 | themeConfig: { 22 | multiVersionBuild: { 23 | satisfies: '>=1.6.0', 24 | }, 25 | sidebar: sidebar(), 26 | }, 27 | }); 28 | 29 | function sidebar() { 30 | return [ 31 | { 32 | text: 'Introduction', 33 | collapsed: false, 34 | items: [ 35 | {text: 'Introduction', link: '/'}, 36 | {text: 'Installation', link: '/install'}, 37 | {text: 'Configuration', link: '/config'}, 38 | {text: 'Extensions', link: '/extensions'}, 39 | {text: 'Caveats', link: '/caveats'}, 40 | ], 41 | }, 42 | { 43 | text: 'Contribution', 44 | collapsed: false, 45 | items: [ 46 | {text: 'Development', link: '/development'}, 47 | {text: 'Team', link: '/team'}, 48 | ], 49 | }, 50 | { 51 | text: 'Help & Support', 52 | collapsed: false, 53 | items: [ 54 | {text: 'GitHub', link: 'https://github.com/lando/php/issues/new/choose'}, 55 | {text: 'Slack', link: 'https://www.launchpass.com/devwithlando'}, 56 | {text: 'Contact Us', link: '/support'}, 57 | {text: 'Examples', link: 'https://github.com/lando/php/tree/main/examples'}, 58 | {text: 'Guides', link: '/guides', activeMatch: '/guides'}, 59 | ], 60 | }, 61 | ]; 62 | }; 63 | -------------------------------------------------------------------------------- /docs/.vitepress/theme/index.mjs: -------------------------------------------------------------------------------- 1 | import VPLTheme from '@lando/vitepress-theme-default-plus'; 2 | 3 | export default VPLTheme; 4 | -------------------------------------------------------------------------------- /docs/caveats.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Caveats 3 | description: Learn about caveats and known issues with the Lando PHP service. 4 | --- 5 | 6 | # Caveats 7 | 8 | ## Path Considerations 9 | 10 | Lando will set the `PATH` hierarchy for this service as follows: 11 | 12 | ```js 13 | [ 14 | # The line below should be where your app's composer.json binaries live 15 | '/app/vendor/bin', 16 | '/app/bin', 17 | '/usr/local/sbin', 18 | '/usr/local/bin', 19 | '/usr/sbin', 20 | '/usr/bin', 21 | '/sbin', 22 | '/bin', 23 | # The line below should be where global composer binaries live 24 | '/var/www/.composer/vendor/bin', 25 | ] 26 | ``` 27 | 28 | This is useful to note if you are not using absolute paths in any [tooling routes](https://docs.lando.dev/landofile/tooling.html) and are getting the unexpected version of a particular utility. 29 | -------------------------------------------------------------------------------- /docs/guides.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Home helpful guides for the PHP recipe. 3 | layout: page 4 | title: Guides 5 | sidebar: true 6 | --- 7 | 8 | 15 | 16 | 17 | 18 | 21 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/guides/accessing-logs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Accessing the PHP Error Logs 3 | description: Learn how to see your PHP error logs in Lando. 4 | guide: true 5 | authors: 6 | - name: Geoff St. Pierre 7 | link: mailto:lando@lando.dev 8 | pic: https://www.gravatar.com/avatar/e103c2a2a8f8caf5848b38b80422cdd9 9 | updated: 10 | timestamp: 1613073690000 11 | mailchimp: 12 | action: https://dev.us12.list-manage.com/subscribe/post?u=59874b4d6910fa65e724a4648&id=613837077f 13 | title: Want more PHP guide content? 14 | byline: Signup and we will send you a weekly blog digest of similar content to keep you satiated. 15 | button: Sign me up! 16 | --- 17 | 18 | # Accessing the PHP Error Logs 19 | 20 | Seeing errors coming off a PHP app is usually very easy in Lando: 21 | 22 | ```bash 23 | lando logs -s appserver -f 24 | ``` 25 | 26 | Because `lando logs` is actually a light wrapper around `docker logs`, you'll notice that you also get general server error messages and other warnings aside from PHP errors. Sometimes it can help to grep the output to isolate PHP-relevant messages: 27 | 28 | ```bash 29 | lando logs -s appserver -f | grep 'WARNING\|PHP' 30 | ``` 31 | 32 | ::: warning If PHP isn't running in "appserver"... 33 | `appserver` is the default service name in most PHP applications on Lando. If you have PHP running in a service with a different name than `appserver`, simply substitute the relevant service name instead of `appserver`. 34 | ::: 35 | -------------------------------------------------------------------------------- /docs/guides/installing-extensions.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installing PHP Extensions on Lando 3 | description: Learn a few ways you can install extra php extensions to your Lando PHP service 4 | guide: true 5 | authors: 6 | - name: Geoff St. Pierre 7 | link: mailto:lando@lando.dev 8 | pic: https://www.gravatar.com/avatar/e103c2a2a8f8caf5848b38b80422cdd9 9 | updated: 10 | timestamp: 1613073690000 11 | mailchimp: 12 | action: https://dev.us12.list-manage.com/subscribe/post?u=59874b4d6910fa65e724a4648&id=613837077f 13 | title: Want more PHP guide content? 14 | byline: Signup and we will send you a weekly blog digest of similar content to keep you satiated. 15 | button: Sign me up! 16 | --- 17 | 18 | # Installing PHP Extensions on Lando 19 | 20 | You may wish to add additional PHP extensions to your Lando [PHP service](https://docs.lando.dev/plugins/php). There are a few different ways you can do this: 21 | 22 | [[toc]] 23 | 24 | Note that both of these strategies make use of underlying utilities provided by the [Official Docker PHP Image](https://hub.docker.com/_/php) which is the base image used by Lando's PHP service. We recommend you read more about them [over on their docs](https://hub.docker.com/_/php). 25 | 26 | Also note that you may need to adapt these slightly depending on the PHP version you are using. 27 | 28 | ## 1. Using build steps 29 | 30 | If installing your PHP extension is fairly trivial and not a long-running operation you may wish to simply use Lando [build-steps](https://docs.lando.dev/services/lando-3.html#build-steps) 31 | 32 | Here is an example that uses build-steps to install the `xsl` and `stats` extensions. 33 | 34 | ```yaml 35 | services: 36 | myservice: 37 | type: php 38 | build_as_root: 39 | - apt-get update -y 40 | - apt install libxslt1-dev -y 41 | - pecl install stats-2.0.3 42 | - docker-php-ext-install xsl 43 | - docker-php-ext-enable stats 44 | ``` 45 | 46 | You can verify the extension was enabled by running: 47 | 48 | ```bash 49 | lando ssh -s myservice -c "php -m" 50 | ``` 51 | 52 | A downside of this approach is these steps till run _EVERY TIME_ you do a `lando rebuild`. 53 | 54 | ## 2. Using Dockerfiles 55 | 56 | If you have complex, lengthy or long running build steps you may wish to create a `Dockerfile` in your repo that directly extends one of [Lando's PHP images](https://hub.docker.com/r/devwithlando/php/tags). 57 | 58 | This approach is great if you care about rebuild speed. Docker will cache the resultant image and only rebuild if the Dockerfile changes. By extension this means your `lando rebuild` will be pretty fast as well. 59 | 60 | It also ensures your Landofile does not get unruly. 61 | 62 | Here is an example that installs the `oci8` and `pdo_sqlsrv` extension. 63 | 64 | **.lando.yml** 65 | 66 | ```yaml 67 | services: 68 | myservice: 69 | type: php:custom 70 | overrides: 71 | image: lando/php:7.3-custom 72 | build: 73 | context: ./ 74 | dockerfile: Dockerfile.custom 75 | ports: 76 | - "80" 77 | ``` 78 | 79 | **Dockerfile.custom** 80 | 81 | ```docker 82 | FROM devwithlando/php:7.3-apache-2 83 | 84 | # Add php extension helper 85 | ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 86 | 87 | # Install Oracle Instantclient, OCI8 and Microsoft SQL Server extensions 88 | RUN chmod +x /usr/local/bin/install-php-extensions && sync && \ 89 | install-php-extensions oci8-2.2.0 sqlsrv pdo_sqlsrv 90 | ``` 91 | 92 | You can verify the extension was enabled by running 93 | 94 | ```bash 95 | lando ssh -s myservice -c "php -m" 96 | ``` 97 | -------------------------------------------------------------------------------- /docs/guides/installing-node.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installing node in your Lando PHP service 3 | description: Learn how to install node in a Lando PHP service for things like Pattern Lab or Emulsify 4 | guide: true 5 | authors: 6 | - name: Geoff St. Pierre 7 | link: mailto:lando@lando.dev 8 | pic: https://www.gravatar.com/avatar/e103c2a2a8f8caf5848b38b80422cdd9 9 | updated: 10 | timestamp: 1613073690000 11 | mailchimp: 12 | action: https://dev.us12.list-manage.com/subscribe/post?u=59874b4d6910fa65e724a4648&id=613837077f 13 | title: Want more PHP guide content? 14 | byline: Signup and we will send you a weekly blog digest of similar content to keep you satiated. 15 | button: Sign me up! 16 | --- 17 | 18 | # Installing Node in Your Lando PHP Service 19 | 20 | Some frontend tooling kits like [Emulsify](https://www.drupal.org/project/emulsify_drupal) or [Pattern Lab](https://patternlab.io/) _may_ assume that `composer/php` can invoke `yarn/npm/node` and vice-versa. This pattern, sadly, is fundamentally at odds with Lando's one-thing-per-container model. 21 | 22 | You can, however, get around it by installing the needed dependencies directly in the service that requires them. 23 | 24 | We've found installing `node` inside a Lando PHP service to generally be the path of least resistance. 25 | 26 | ## 1. Using build steps 27 | 28 | Below is an example that installs `node12` using [build-steps](https://docs.lando.dev/services/lando-3.html#build-steps). 29 | 30 | ```yaml 31 | services: 32 | myservice: 33 | type: php 34 | build_as_root: 35 | # Note that you will want to use the script for the major version of node you want to install 36 | # See: https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions 37 | - curl -sL https://deb.nodesource.com/setup_12.x | bash - 38 | - apt-get install -y nodejs 39 | tooling: 40 | node: 41 | service: myservice 42 | npm: 43 | service: myservice 44 | ``` 45 | 46 | You can verify with: 47 | 48 | ```bash 49 | lando node -v 50 | lando npm -v 51 | ``` 52 | 53 | ## 2. Extending a Dockerfile 54 | 55 | If you are planning to extend your service with _additional_ build steps or would like to cache the build steps for a faster `lando rebuild` you should instead consider [extending with a Dockerfile](https://docs.lando.dev/services/lando-3.html#using-dockerfiles) as in the example below: 56 | 57 | **.lando.yml** 58 | 59 | ```yaml 60 | services: 61 | myservice: 62 | type: php:custom 63 | via: cli 64 | overrides: 65 | image: lando/php:7.4-with-node12 66 | build: 67 | context: ./ 68 | dockerfile: Dockerfile.node 69 | tooling: 70 | node: 71 | service: myservice 72 | npm: 73 | service: myservice 74 | ``` 75 | 76 | **Dockerfile.node** 77 | 78 | ```docker 79 | FROM devwithlando/php:7.4-apache-2 80 | 81 | # Choose the major node version 82 | ENV NODE_VERSION=12 83 | 84 | # Install node 85 | RUN curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ 86 | && apt-get install -y nodejs 87 | ``` 88 | 89 | Again, you can verify with: 90 | 91 | ```bash 92 | lando node -v 93 | lando npm -v 94 | ``` 95 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: PHP Lando Plugin 3 | description: Add a highly configurable php service to Lando for local development with all the power of Docker and Docker Compose; comes with composer, xdebug and multiple versions for lols. 4 | next: ./config.html 5 | --- 6 | 7 | # PHP 8 | 9 | [PHP](https://www.php.net/) is a popular scripting language that is especially suited for web development. It is often served by either [apache](https://docs.lando.dev/plugins/apache/) or [nginx](https://docs.lando.dev/plugins/nginx/). 10 | 11 | You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev). 12 | 13 | ```yaml 14 | services: 15 | myservice: 16 | type: php:8.4 17 | via: nginx:1.27 18 | webroot: www 19 | ``` 20 | 21 | ## Supported versions 22 | 23 | * [8.4](https://hub.docker.com/r/devwithlando/php) 24 | * [8.3](https://hub.docker.com/r/devwithlando/php) 25 | * [8.2](https://hub.docker.com/r/devwithlando/php) 26 | * [8.1](https://hub.docker.com/r/devwithlando/php) 27 | * [8.0](https://hub.docker.com/r/devwithlando/php) 28 | * **[7.4](https://hub.docker.com/r/devwithlando/php)** **(default)** 29 | * [7.3](https://hub.docker.com/r/devwithlando/php) 30 | * [custom](https://docs.lando.dev/services/lando-3.html#overrides) 31 | 32 | ## Legacy versions 33 | 34 | ::: warning Using Unsupported PHP Versions! 35 | While you can currently use some [EOL php version](https://www.php.net/supported-versions.php) with Lando, it's worth noting that we also do not support such versions, so your mileage may vary. If you are having issues with unsupported versions and open a ticket about it, the most likely response you will get is "upgrade to a supported version". 36 | ::: 37 | 38 | You can still run these versions with Lando but for all intents and purposes they should be considered deprecated (e.g. YMMV and do not expect a ton of support if you have an issue). 39 | 40 | * [7.2](https://hub.docker.com/r/devwithlando/php) 41 | * [7.1](https://hub.docker.com/r/devwithlando/php) 42 | * [7.0](https://hub.docker.com/r/devwithlando/php) 43 | * [5.6](https://hub.docker.com/r/devwithlando/php) 44 | * [5.5](https://hub.docker.com/r/devwithlando/php) 45 | * [5.4](https://hub.docker.com/r/devwithlando/php) 46 | * [5.3](https://hub.docker.com/r/devwithlando/php) 47 | 48 | ## Patch versions 49 | 50 | Because we use our own custom images for `php`, specifying a patch version is not currently supported. 51 | 52 | If you **really** need to lock down to a patch version, you could consider using either a [custom compose service](https://docs.lando.dev/plugins/compose) or a service [overrides](https://docs.lando.dev/services/lando-3.html#overrides). 53 | 54 | -------------------------------------------------------------------------------- /docs/install.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation 3 | description: How to install the Lando PHP Plugin. 4 | --- 5 | 6 | # Installation 7 | 8 | If you are using Lando 3 then its *highly likely* you already have this plugin as its included by default in most installation pathways. You can verify this by running: 9 | 10 | ```sh 11 | lando version --component @lando/php 12 | ``` 13 | 14 | However if you would like to manually install the plugin, update it to the bleeding edge or install a particular version then use the below. 15 | 16 | ::: code-group 17 | ```sh [lando 3.21+] 18 | lando plugin-add @lando/php 19 | ``` 20 | 21 | ```sh [hyperdrive] 22 | # @NOTE: This doesn't actaully work yet 23 | hyperdrive install @lando/php 24 | ``` 25 | 26 | ```sh [docker] 27 | # Ensure you have a global plugins directory 28 | mkdir -p ~/.lando/plugins 29 | 30 | # Install plugin 31 | # NOTE: Modify the "npm install @lando/php" line to install a particular version eg 32 | # npm install @lando/php@0.5.2 33 | docker run --rm -it -v ${HOME}/.lando/plugins:/plugins -w /tmp node:18-alpine sh -c \ 34 | "npm init -y \ 35 | && npm install @lando/php --production --flat --no-default-rc --no-lockfile --link-duplicates \ 36 | && npm install --production --cwd /tmp/node_modules/@lando/php \ 37 | && mkdir -p /plugins/@lando \ 38 | && mv --force /tmp/node_modules/@lando/php /plugins/@lando/php" 39 | 40 | # Rebuild the plugin cache 41 | lando --clear 42 | ``` 43 | ::: 44 | 45 | You should be able to verify the plugin is installed by running `lando config --path plugins` and checking for `@lando/php`. This command will also show you _where_ the plugin is being loaded from. 46 | -------------------------------------------------------------------------------- /docs/public/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lando/php/99252d7c49ace5f5aa076c3a5a3b790f7dbef930/docs/public/favicon.ico -------------------------------------------------------------------------------- /docs/public/favicon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lando/php/99252d7c49ace5f5aa076c3a5a3b790f7dbef930/docs/public/images/icon.png -------------------------------------------------------------------------------- /docs/public/images/icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lando/php/99252d7c49ace5f5aa076c3a5a3b790f7dbef930/docs/public/images/logo.png -------------------------------------------------------------------------------- /docs/public/images/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/public/images/phpicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lando/php/99252d7c49ace5f5aa076c3a5a3b790f7dbef930/docs/public/images/phpicon.png -------------------------------------------------------------------------------- /docs/support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact Us 3 | description: Get help and support for the Lando PHP Plugin 4 | --- 5 | 6 | # Contact Us 7 | 8 | If you need priority and dedicated support, expediated bug fixes or more features then please contact us below. 9 | 10 |
11 | 12 |

13 | 14 |

15 |

16 | 17 |

18 |

19 | 20 |

21 |

22 | 23 |

24 |
25 | -------------------------------------------------------------------------------- /docs/team.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: Learn about the team that made the PHP plugin. 3 | layout: page 4 | title: Team 5 | --- 6 | 7 | 8 | 9 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /docs/v/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | description: All Other documentation versions 3 | title: Docuverse 4 | contributors: false 5 | lastUpdated: false 6 | editLink: false 7 | next: false 8 | prev: false 9 | --- 10 | # Docuverse 11 | 12 |
13 |
14 | 15 | 27 | 28 |
29 | 30 |
31 | 32 |
33 | 34 | 40 | -------------------------------------------------------------------------------- /examples/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lando/php/99252d7c49ace5f5aa076c3a5a3b790f7dbef930/examples/.gitkeep -------------------------------------------------------------------------------- /examples/5.6/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/5.6/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php56 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:5.6 8 | composer_lts: 9 | type: php:5.6 10 | composer_version: 2.2 11 | cli: 12 | type: php:5.6 13 | composer_version: 1 14 | via: cli 15 | cliworker: 16 | type: php:5.6 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:5.6 22 | composer_version: true 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | xdebug: true 27 | config: 28 | php: config/php.ini 29 | overrides: 30 | image: devwithlando/php:5.6-fpm-5 31 | environment: 32 | DUALBLADE: maxim 33 | OTHER: thing 34 | custom_nginx: 35 | build_as_root: 36 | - apt-get update -y 37 | - apt-get install curl -y 38 | - mkdir -p /app/test && touch /app/test/managed_build_step 39 | overrides: 40 | environment: 41 | MORE: things 42 | OTHER: stuff 43 | tooling: 44 | php: 45 | service: defaults 46 | 47 | # This is important because it lets lando know to test against the plugin in this repo 48 | # DO NOT REMOVE THIS! 49 | plugins: 50 | "@lando/php": ../.. 51 | -------------------------------------------------------------------------------- /examples/5.6/README.md: -------------------------------------------------------------------------------- 1 | # PHP 5.6 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | * [Issue #1990](https://github.com/lando/lando/issues/1990) 7 | * [Issue #2192](https://github.com/lando/lando/issues/2192) 8 | 9 | And probably other stuff 10 | 11 | ## Start up tests 12 | 13 | Run the following commands to get up and running with this example. 14 | 15 | ```bash 16 | # Should start up successfully 17 | lando poweroff 18 | lando start 19 | ``` 20 | 21 | ## Verification commands 22 | 23 | Run the following commands to validate things are rolling as they should. 24 | 25 | ```bash 26 | # Should use 5.6 as the default php version 27 | lando exec defaults -- php -v | grep "PHP 5.6" 28 | 29 | # Should use 9.x as the default postgresql-client version 30 | lando exec defaults -- psql -V | grep "9." 31 | 32 | # Should use apache 2.4 as the default webserver version 33 | lando exec defaults -- apachectl -V | grep "2.4." 34 | 35 | # Should only serve over http by default 36 | lando exec defaults -- curl https://localhost || echo $? | grep 7 37 | 38 | # Should serve from the app root by default 39 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 40 | 41 | # Should have a 1G php mem limit on appserver 42 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 43 | 44 | # Should have COMPOSER_MEMORY_LIMIT set to -1 45 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 46 | 47 | # Should install composer 2.2.x by default 48 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2." 49 | 50 | # Should have unlimited memory for php for CLI opts 51 | lando php -i | grep memory_limit | grep -e "-1" 52 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 53 | 54 | # Should not enable xdebug by default 55 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 56 | 57 | # Should install composer 2.2.x if composer_version is set to 2.2 58 | lando exec composer_lts -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2." 59 | 60 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 61 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 62 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 63 | 64 | # Should use specified php version if given 65 | lando exec custom -- php -v | grep "PHP 5.6" 66 | 67 | # Should install composer 2.2.x if composer_version is set to true 68 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2." 69 | 70 | # Should serve via nginx if specified 71 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 72 | 73 | # Should serve via https if specified 74 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 75 | 76 | # Should enable xdebug if specified 77 | lando exec custom -- php -m | grep "xdebug" 78 | 79 | # Should not serve port 80 for cli 80 | lando exec cli -- curl http://localhost || echo $? | grep 7 81 | 82 | # Should install the latest composer 1.x using the 1 flag 83 | lando exec cli -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1." 84 | 85 | # Should use custom php ini if specified 86 | lando exec custom -- php -i | grep memory_limit | grep 514 87 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 88 | 89 | # Should serve and be accessible over ssl if specified 90 | lando exec custom_nginx -- curl https://localhost 91 | lando exec custom -- curl https://custom_nginx 92 | 93 | # Should inherit overrides from its generator 94 | lando exec custom -- env | grep DUALBLADE | grep maxim 95 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 96 | 97 | # Should be able to run build steps on lando managed nginx service 98 | # https://github.com/lando/lando/issues/1990 99 | lando exec custom_nginx -- cat /app/test/managed_build_step 100 | 101 | # Should be able to override lando managed nginx service 102 | # https://github.com/lando/lando/issues/1990 103 | lando exec custom_nginx -- env | grep OTHER | grep stuff 104 | lando exec custom_nginx -- env | grep MORE | grep things 105 | 106 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 107 | # https://github.com/lando/lando/issues/2192 108 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 109 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 110 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 111 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 112 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 113 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 114 | 115 | # Should allow cli services to specify a boot up command 116 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 117 | 118 | # Should not install composer when composer_version is false 119 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 120 | ``` 121 | 122 | ## Destroy tests 123 | 124 | Run the following commands to trash this app like nothing ever happened. 125 | 126 | ```bash 127 | # Should be destroyed with success 128 | lando destroy -y 129 | lando poweroff 130 | ``` 131 | -------------------------------------------------------------------------------- /examples/5.6/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/5.6/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/5.6/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/5.6/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/5.6/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/5.6/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.0/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/7.0/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php70 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:7.0 8 | cli: 9 | type: php:7.0 10 | composer_version: 1 11 | via: cli 12 | build_as_root: 13 | - echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list 14 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 15 | - apt-get update -y 16 | - apt-get install -y nodejs 17 | cliworker: 18 | type: php:7.0 19 | composer_version: false 20 | via: cli 21 | command: sleep infinity 22 | custom: 23 | type: php:7.0 24 | composer_version: 2-latest 25 | via: nginx 26 | ssl: true 27 | webroot: web 28 | xdebug: true 29 | config: 30 | php: config/php.ini 31 | overrides: 32 | image: devwithlando/php:7.0-fpm-5 33 | environment: 34 | DUALBLADE: maxim 35 | OTHER: thing 36 | custom_nginx: 37 | build_as_root: 38 | - apt-get update -y 39 | - apt-get install curl -y 40 | - mkdir -p /app/test && touch /app/test/managed_build_step 41 | overrides: 42 | environment: 43 | MORE: things 44 | OTHER: stuff 45 | tooling: 46 | php: 47 | service: defaults 48 | node: 49 | service: :host 50 | options: 51 | host: 52 | description: The service to use 53 | default: cli 54 | alias: 55 | - h 56 | 57 | # This is important because it lets lando know to test against the plugin in this repo 58 | # DO NOT REMOVE THIS! 59 | plugins: 60 | "@lando/php": ../.. 61 | -------------------------------------------------------------------------------- /examples/7.0/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/7.0/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/7.0/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.0/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.0/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.0/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.1/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/7.1/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php71 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:7.1 8 | cli: 9 | type: php:7.1 10 | composer_version: 1 11 | via: cli 12 | build_as_root: 13 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 14 | - apt-get update -y 15 | - apt-get install -y nodejs 16 | cliworker: 17 | type: php:7.1 18 | composer_version: false 19 | via: cli 20 | command: sleep infinity 21 | custom: 22 | type: php:7.1 23 | composer_version: 2-latest 24 | via: nginx 25 | ssl: true 26 | webroot: web 27 | xdebug: true 28 | config: 29 | php: config/php.ini 30 | overrides: 31 | image: devwithlando/php:7.1-fpm-5 32 | environment: 33 | DUALBLADE: maxim 34 | OTHER: thing 35 | custom_nginx: 36 | build_as_root: 37 | - apt-get update -y 38 | - apt-get install curl -y 39 | - mkdir -p /app/test && touch /app/test/managed_build_step 40 | overrides: 41 | environment: 42 | MORE: things 43 | OTHER: stuff 44 | tooling: 45 | php: 46 | service: defaults 47 | node: 48 | service: :host 49 | options: 50 | host: 51 | description: The service to use 52 | default: cli 53 | alias: 54 | - h 55 | 56 | # This is important because it lets lando know to test against the plugin in this repo 57 | # DO NOT REMOVE THIS! 58 | plugins: 59 | "@lando/php": ../.. 60 | -------------------------------------------------------------------------------- /examples/7.1/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/7.1/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/7.1/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.1/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.1/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.1/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.2/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/7.2/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php72 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:7.2 8 | cli: 9 | type: php:7.2 10 | composer_version: 1 11 | via: cli 12 | build_as_root: 13 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 14 | - apt-get update -y 15 | - apt-get install -y nodejs 16 | cliworker: 17 | type: php:7.2 18 | composer_version: false 19 | via: cli 20 | command: sleep infinity 21 | custom: 22 | type: php:7.2 23 | composer_version: 2-latest 24 | via: nginx 25 | ssl: true 26 | webroot: web 27 | xdebug: true 28 | config: 29 | php: config/php.ini 30 | overrides: 31 | image: devwithlando/php:7.2-fpm-5 32 | environment: 33 | DUALBLADE: maxim 34 | OTHER: thing 35 | custom_nginx: 36 | build_as_root: 37 | - apt-get update -y 38 | - apt-get install curl -y 39 | - mkdir -p /app/test && touch /app/test/managed_build_step 40 | overrides: 41 | environment: 42 | MORE: things 43 | OTHER: stuff 44 | tooling: 45 | php: 46 | service: defaults 47 | node: 48 | service: :host 49 | options: 50 | host: 51 | description: The service to use 52 | default: cli 53 | alias: 54 | - h 55 | 56 | # This is important because it lets lando know to test against the plugin in this repo 57 | # DO NOT REMOVE THIS! 58 | plugins: 59 | "@lando/php": ../.. 60 | -------------------------------------------------------------------------------- /examples/7.2/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/7.2/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/7.2/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.2/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.2/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.2/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.3/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/7.3/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php73 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:7.3 8 | cli: 9 | type: php:7.3 10 | via: cli 11 | build_as_root: 12 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 13 | - apt-get update -y 14 | - apt-get install -y nodejs 15 | cliworker: 16 | type: php:7.3 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:7.3 22 | composer_version: 2-latest 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | xdebug: true 27 | config: 28 | php: config/php.ini 29 | overrides: 30 | image: devwithlando/php:7.3-fpm-5 31 | environment: 32 | DUALBLADE: maxim 33 | OTHER: thing 34 | custom_nginx: 35 | build_as_root: 36 | - apt-get update -y 37 | - apt-get install curl -y 38 | - mkdir -p /app/test && touch /app/test/managed_build_step 39 | overrides: 40 | environment: 41 | MORE: things 42 | OTHER: stuff 43 | tooling: 44 | php: 45 | service: defaults 46 | node: 47 | service: :host 48 | options: 49 | host: 50 | description: The service to use 51 | default: cli 52 | alias: 53 | - h 54 | 55 | # This is important because it lets lando know to test against the plugin in this repo 56 | # DO NOT REMOVE THIS! 57 | plugins: 58 | "@lando/php": ../.. 59 | -------------------------------------------------------------------------------- /examples/7.3/README.md: -------------------------------------------------------------------------------- 1 | # PHP 7.3 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | * [Installing Node in a PHP Service](https://docs.lando.dev/guides/installing-node-in-your-lando-php-service.html) 7 | * [Issue #1990](https://github.com/lando/lando/issues/1990) 8 | * [Issue #2192](https://github.com/lando/lando/issues/2192) 9 | 10 | And probably other stuff 11 | 12 | ## Start up tests 13 | 14 | Run the following commands to get up and running with this example. 15 | 16 | ```bash 17 | # Should start up successfully 18 | lando poweroff 19 | lando start 20 | ``` 21 | 22 | ## Verification commands 23 | 24 | Run the following commands to validate things are rolling as they should. 25 | 26 | ```bash 27 | # Should use 7.3 as the default php version 28 | lando exec defaults -- php -v | grep "PHP 7.3" 29 | 30 | # Should use 13.x as the default postgresql-client version 31 | lando exec defaults -- psql -V | grep "13." 32 | 33 | # Should use apache 2.4 as the default webserver version 34 | lando exec defaults -- apachectl -V | grep "2.4." 35 | 36 | # Should only serve over http by default 37 | lando exec defaults -- curl https://localhost || echo $? | grep 7 38 | 39 | # Should serve from the app root by default 40 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 41 | 42 | # Should have a 1G php mem limit on appserver 43 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 44 | 45 | # Should have COMPOSER_MEMORY_LIMIT set to -1 46 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 47 | 48 | # Should install composer 2.x by default 49 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 50 | 51 | # Should have unlimited memory for php for CLI opts 52 | lando php -i | grep memory_limit | grep -e "-1" 53 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 54 | 55 | # Should not enable xdebug by default 56 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 57 | 58 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 59 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 60 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 61 | 62 | # Should use specified php version if given 63 | lando exec custom -- php -v | grep "PHP 7.3" 64 | 65 | # Should install composer 2.x if 2-latest is set 66 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 67 | 68 | # Should serve via nginx if specified 69 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 70 | 71 | # Should serve via https if specified 72 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 73 | 74 | # Should enable xdebug if specified 75 | lando exec custom -- php -m | grep "xdebug" 76 | 77 | # Should not serve port 80 for cli 78 | lando exec cli -- curl http://localhost || echo $? | grep 7 79 | 80 | # Should use custom php ini if specified 81 | lando exec custom -- php -i | grep memory_limit | grep 514 82 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 83 | 84 | # Should serve and be accessible over ssl if specified 85 | lando exec custom_nginx -- curl https://localhost 86 | lando exec custom -- curl https://custom_nginx 87 | 88 | # Should inherit overrides from its generator 89 | lando exec custom -- env | grep DUALBLADE | grep maxim 90 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 91 | 92 | # Should be able to run build steps on lando managed nginx service 93 | # https://github.com/lando/lando/issues/1990 94 | lando exec custom_nginx -- cat /app/test/managed_build_step 95 | 96 | # Should be able to override lando managed nginx service 97 | # https://github.com/lando/lando/issues/1990 98 | lando exec custom_nginx -- env | grep OTHER | grep stuff 99 | lando exec custom_nginx -- env | grep MORE | grep things 100 | 101 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 102 | # https://github.com/lando/lando/issues/2192 103 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 104 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 105 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 106 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 107 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 108 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 109 | 110 | # Should allow cli services to specify a boot up command 111 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 112 | 113 | # Should not install composer when composer_version is false 114 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 115 | 116 | # Should have node14 installed in cli service 117 | lando node -v | grep v14. 118 | ``` 119 | 120 | ## Destroy tests 121 | 122 | Run the following commands to trash this app like nothing ever happened. 123 | 124 | ```bash 125 | # Should be destroyed with success 126 | lando destroy -y 127 | lando poweroff 128 | ``` 129 | -------------------------------------------------------------------------------- /examples/7.3/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/7.3/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/7.3/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.3/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.3/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.3/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.4/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/7.4/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php74 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:7.4 8 | cli: 9 | type: php:7.4 10 | composer_version: 1-latest 11 | via: cli 12 | build_as_root: 13 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 14 | - apt-get update -y 15 | - apt-get install -y nodejs 16 | cliworker: 17 | type: php:7.4 18 | composer_version: false 19 | via: cli 20 | command: sleep infinity 21 | custom: 22 | type: php:7.4 23 | composer_version: 2-latest 24 | via: nginx 25 | ssl: true 26 | webroot: web 27 | xdebug: true 28 | config: 29 | php: config/php.ini 30 | overrides: 31 | image: devwithlando/php:7.4-fpm-5 32 | environment: 33 | DUALBLADE: maxim 34 | OTHER: thing 35 | custom_nginx: 36 | build_as_root: 37 | - apt-get update -y 38 | - apt-get install curl -y 39 | - mkdir -p /app/test && touch /app/test/managed_build_step 40 | overrides: 41 | environment: 42 | MORE: things 43 | OTHER: stuff 44 | tooling: 45 | php: 46 | service: defaults 47 | node: 48 | service: :host 49 | options: 50 | host: 51 | description: The service to use 52 | default: cli 53 | alias: 54 | - h 55 | 56 | # This is important because it lets lando know to test against the plugin in this repo 57 | # DO NOT REMOVE THIS! 58 | plugins: 59 | "@lando/php": ../.. 60 | -------------------------------------------------------------------------------- /examples/7.4/README.md: -------------------------------------------------------------------------------- 1 | # PHP 7.4 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | * [Installing Node in a PHP Service](https://docs.lando.dev/guides/installing-node-in-your-lando-php-service.html) 7 | * [Issue #1990](https://github.com/lando/lando/issues/1990) 8 | * [Issue #2192](https://github.com/lando/lando/issues/2192) 9 | 10 | And probably other stuff 11 | 12 | ## Start up tests 13 | 14 | Run the following commands to get up and running with this example. 15 | 16 | ```bash 17 | # Should start up successfully 18 | lando poweroff 19 | lando start 20 | ``` 21 | 22 | ## Verification commands 23 | 24 | Run the following commands to validate things are rolling as they should. 25 | 26 | ```bash 27 | # Should use 7.4 as the default php version 28 | lando exec defaults -- php -v | grep "PHP 7.4" 29 | 30 | # Should use 13.x as the default postgresql-client version 31 | lando exec defaults -- psql -V | grep "13." 32 | 33 | # Should use apache 2.4 as the default webserver version 34 | lando exec defaults -- apachectl -V | grep "2.4." 35 | 36 | # Should only serve over http by default 37 | lando exec defaults -- curl https://localhost || echo $? | grep 7 38 | 39 | # Should serve from the app root by default 40 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 41 | 42 | # Should have a 1G php mem limit on appserver 43 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 44 | 45 | # Should have COMPOSER_MEMORY_LIMIT set to -1 46 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 47 | 48 | # Should install composer 2.x by default 49 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 50 | 51 | # Should have unlimited memory for php for CLI opts 52 | lando php -i | grep memory_limit | grep -e "-1" 53 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 54 | 55 | # Should not enable xdebug by default 56 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 57 | 58 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 59 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 60 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 61 | 62 | # Should use specified php version if given 63 | lando exec custom -- php -v | grep "PHP 7.4" 64 | 65 | # Should install composer 2.x if 2-latest is set 66 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 67 | 68 | # Should serve via nginx if specified 69 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 70 | 71 | # Should serve via https if specified 72 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 73 | 74 | # Should enable xdebug if specified 75 | lando exec custom -- php -m | grep "xdebug" 76 | 77 | # Should not serve port 80 for cli 78 | lando exec cli -- curl http://localhost || echo $? | grep 7 79 | 80 | # Should use custom php ini if specified 81 | lando exec custom -- php -i | grep memory_limit | grep 514 82 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 83 | 84 | # Should serve and be accessible over ssl if specified 85 | lando exec custom_nginx -- curl https://localhost 86 | lando exec custom -- curl https://custom_nginx 87 | 88 | # Should inherit overrides from its generator 89 | lando exec custom -- env | grep DUALBLADE | grep maxim 90 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 91 | 92 | # Should be able to run build steps on lando managed nginx service 93 | # https://github.com/lando/lando/issues/1990 94 | lando exec custom_nginx -- cat /app/test/managed_build_step 95 | 96 | # Should be able to override lando managed nginx service 97 | # https://github.com/lando/lando/issues/1990 98 | lando exec custom_nginx -- env | grep OTHER | grep stuff 99 | lando exec custom_nginx -- env | grep MORE | grep things 100 | 101 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 102 | # https://github.com/lando/lando/issues/2192 103 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 104 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 105 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 106 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 107 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 108 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 109 | 110 | # Should allow cli services to specify a boot up command 111 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 112 | 113 | # Should not install composer if composer_version is false 114 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 115 | 116 | # Should have node14 installed in cli service 117 | lando node -v | grep v14. 118 | ``` 119 | 120 | ## Destroy tests 121 | 122 | Run the following commands to trash this app like nothing ever happened. 123 | 124 | ```bash 125 | # Should be destroyed with success 126 | lando destroy -y 127 | lando poweroff 128 | ``` 129 | -------------------------------------------------------------------------------- /examples/7.4/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/7.4/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/7.4/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.4/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/7.4/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/7.4/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.0/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/8.0/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php80 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:8.0 8 | cli: 9 | type: php:8.0 10 | via: cli 11 | build_as_root: 12 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 13 | - apt-get update -y 14 | - apt-get install -y nodejs 15 | cliworker: 16 | type: php:8.0 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:8.0 22 | composer_version: "2.1.12" 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | xdebug: true 27 | config: 28 | php: config/php.ini 29 | overrides: 30 | image: devwithlando/php:8.0-fpm-5 31 | environment: 32 | DUALBLADE: maxim 33 | OTHER: thing 34 | custom_nginx: 35 | build_as_root: 36 | - apt-get update -y 37 | - apt-get install curl -y 38 | - mkdir -p /app/test && touch /app/test/managed_build_step 39 | overrides: 40 | environment: 41 | MORE: things 42 | OTHER: stuff 43 | tooling: 44 | php: 45 | service: defaults 46 | node: 47 | service: :host 48 | options: 49 | host: 50 | description: The service to use 51 | default: cli 52 | alias: 53 | - h 54 | 55 | # This is important because it lets lando know to test against the plugin in this repo 56 | # DO NOT REMOVE THIS! 57 | plugins: 58 | "@lando/php": ../.. 59 | -------------------------------------------------------------------------------- /examples/8.0/README.md: -------------------------------------------------------------------------------- 1 | # PHP 8.0 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | 7 | And probably other stuff 8 | 9 | ## Start up tests 10 | 11 | Run the following commands to get up and running with this example. 12 | 13 | ```bash 14 | # Should start up successfully 15 | lando poweroff 16 | lando start 17 | ``` 18 | 19 | ## Verification commands 20 | 21 | Run the following commands to validate things are rolling as they should. 22 | 23 | ```bash 24 | # Should use 8.0 as the default php version 25 | lando exec defaults -- php -v | grep "PHP 8.0" 26 | 27 | # Should use 13.x as the default postgresql-client version 28 | lando exec defaults -- psql -V | grep "13." 29 | 30 | # Should use apache 2.4 as the default webserver version 31 | lando exec defaults -- apachectl -V | grep "2.4." 32 | 33 | # Should only serve over http by default 34 | lando exec defaults -- curl https://localhost || echo $? | grep 7 35 | 36 | # Should serve from the app root by default 37 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 38 | 39 | # Should have a 1G php mem limit on appserver 40 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 41 | 42 | # Should have COMPOSER_MEMORY_LIMIT set to -1 43 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 44 | 45 | # Should install composer 2.x by default 46 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 47 | 48 | # Should have unlimited memory for php for CLI opts 49 | lando php -i | grep memory_limit | grep -e "-1" 50 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 51 | 52 | # Should not enable xdebug by default 53 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 54 | 55 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 56 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 57 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 58 | 59 | # Should use specified php version if given 60 | lando exec custom -- php -v | grep "PHP 8.0" 61 | 62 | # Should install composer 2.1.12 if version number is set 63 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.1.12" 64 | 65 | # Should serve via nginx if specified 66 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 67 | 68 | # Should serve via https if specified 69 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 70 | 71 | # Should enable xdebug if specified 72 | lando exec custom -- php -m | grep "xdebug" 73 | 74 | # Should not serve port 80 for cli 75 | lando exec cli -- curl http://localhost || echo $? | grep 7 76 | 77 | # Should use custom php ini if specified 78 | lando exec custom -- php -i | grep memory_limit | grep 514 79 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 80 | 81 | # Should serve and be accessible over ssl if specified 82 | lando exec custom_nginx -- curl https://localhost 83 | lando exec custom -- curl https://custom_nginx 84 | 85 | # Should inherit overrides from its generator 86 | lando exec custom -- env | grep DUALBLADE | grep maxim 87 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 88 | 89 | # Should be able to run build steps on lando managed nginx service 90 | # https://github.com/lando/lando/issues/1990 91 | lando exec custom_nginx -- cat /app/test/managed_build_step 92 | 93 | # Should be able to override lando managed nginx service 94 | # https://github.com/lando/lando/issues/1990 95 | lando exec custom_nginx -- env | grep OTHER | grep stuff 96 | lando exec custom_nginx -- env | grep MORE | grep things 97 | 98 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 99 | # https://github.com/lando/lando/issues/2192 100 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 101 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 102 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 103 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 104 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 105 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 106 | 107 | # Should allow cli services to specify a boot up command 108 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 109 | 110 | # Should not install composer when composer_version is false 111 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 112 | 113 | # Should have node14 installed in cli service 114 | lando node -v | grep v14. 115 | ``` 116 | 117 | ## Destroy tests 118 | 119 | Run the following commands to trash this app like nothing ever happened. 120 | 121 | ```bash 122 | # Should be destroyed with success 123 | lando destroy -y 124 | lando poweroff 125 | ``` 126 | -------------------------------------------------------------------------------- /examples/8.0/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/8.0/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/8.0/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.0/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.0/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.0/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.1/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/8.1/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php81 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:8.1 8 | cli: 9 | type: php:8.1 10 | via: cli 11 | build_as_root: 12 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 13 | - apt-get update -y 14 | - apt-get install -y nodejs 15 | cliworker: 16 | type: php:8.1 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:8.1 22 | composer_version: "2.1.12" 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | xdebug: true 27 | config: 28 | php: config/php.ini 29 | overrides: 30 | image: devwithlando/php:8.1-fpm-5 31 | environment: 32 | DUALBLADE: maxim 33 | OTHER: thing 34 | custom_nginx: 35 | build_as_root: 36 | - apt-get update -y 37 | - apt-get install curl -y 38 | - mkdir -p /app/test && touch /app/test/managed_build_step 39 | overrides: 40 | environment: 41 | MORE: things 42 | OTHER: stuff 43 | tooling: 44 | php: 45 | service: defaults 46 | node: 47 | service: :host 48 | options: 49 | host: 50 | description: The service to use 51 | default: cli 52 | alias: 53 | - h 54 | 55 | # This is important because it lets lando know to test against the plugin in this repo 56 | # DO NOT REMOVE THIS! 57 | plugins: 58 | "@lando/php": ../.. 59 | -------------------------------------------------------------------------------- /examples/8.1/README.md: -------------------------------------------------------------------------------- 1 | # PHP 8.1 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | 7 | And probably other stuff 8 | 9 | ## Start up tests 10 | 11 | Run the following commands to get up and running with this example. 12 | 13 | ```bash 14 | # Should start up successfully 15 | lando poweroff 16 | lando start 17 | ``` 18 | 19 | ## Verification commands 20 | 21 | Run the following commands to validate things are rolling as they should. 22 | 23 | ```bash 24 | # Should use 8.1 as the default php version 25 | lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.1" 26 | 27 | # Should use 13.x as the default postgresql-client version 28 | lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." 29 | 30 | # Should use apache 2.4 as the default webserver version 31 | lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." 32 | 33 | # Should only serve over http by default 34 | lando exec defaults -- curl https://localhost || echo $? | grep 7 35 | 36 | # Should serve from the app root by default 37 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 38 | 39 | # Should have a 1G php mem limit on appserver 40 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 41 | 42 | # Should have COMPOSER_MEMORY_LIMIT set to -1 43 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 44 | 45 | # Should install composer 2.x by default 46 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 47 | 48 | # Should have unlimited memory for php for CLI opts 49 | lando php -i | grep memory_limit | grep -e "-1" 50 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 51 | 52 | # Should not enable xdebug by default 53 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 54 | 55 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 56 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 57 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 58 | 59 | # Should use specified php version if given 60 | lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.1" 61 | 62 | # Should install composer 2.1.12 if version number is set 63 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.1.12" 64 | 65 | # Should serve via nginx if specified 66 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 67 | 68 | # Should serve via https if specified 69 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 70 | 71 | # Should enable xdebug if specified 72 | lando exec custom -- php -m | grep "xdebug" 73 | 74 | # Should not serve port 80 for cli 75 | lando exec cli -- curl http://localhost || echo $? | grep 7 76 | 77 | # Should use custom php ini if specified 78 | lando exec custom -- php -i | grep memory_limit | grep 514 79 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 80 | 81 | # Should serve and be accessible over ssl if specified 82 | lando exec custom_nginx -- curl https://localhost 83 | lando exec custom -- curl https://custom_nginx 84 | 85 | # Should inherit overrides from its generator 86 | lando exec custom -- env | grep DUALBLADE | grep maxim 87 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 88 | 89 | # Should be able to run build steps on lando managed nginx service 90 | # https://github.com/lando/lando/issues/1990 91 | lando exec custom_nginx -- cat /app/test/managed_build_step 92 | 93 | # Should be able to override lando managed nginx service 94 | # https://github.com/lando/lando/issues/1990 95 | lando exec custom_nginx -- env | grep OTHER | grep stuff 96 | lando exec custom_nginx -- env | grep MORE | grep things 97 | 98 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 99 | # https://github.com/lando/lando/issues/2192 100 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 101 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 102 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 103 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 104 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 105 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 106 | 107 | # Should allow cli services to specify a boot up command 108 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 109 | 110 | # Should not install composer when composer_version is false 111 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 112 | 113 | # Should have node14 installed in cli service 114 | lando node -v | tee >(cat 1>&2) | grep v18. 115 | ``` 116 | 117 | ## Destroy tests 118 | 119 | Run the following commands to trash this app like nothing ever happened. 120 | 121 | ```bash 122 | # Should be destroyed with success 123 | lando destroy -y 124 | lando poweroff 125 | ``` 126 | -------------------------------------------------------------------------------- /examples/8.1/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/8.1/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/8.1/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.1/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.1/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.1/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.2/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/8.2/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php82 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:8.2 8 | cli: 9 | type: php:8.2 10 | via: cli 11 | build_as_root: 12 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 13 | - apt-get update -y 14 | - apt-get install -y nodejs 15 | cliworker: 16 | type: php:8.2 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:8.2 22 | composer_version: "2.2.18" 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | xdebug: true 27 | config: 28 | php: config/php.ini 29 | overrides: 30 | image: devwithlando/php:8.2-fpm-5 31 | environment: 32 | DUALBLADE: maxim 33 | OTHER: thing 34 | custom_nginx: 35 | build_as_root: 36 | - apt-get update -y 37 | - apt-get install curl -y 38 | - mkdir -p /app/test && touch /app/test/managed_build_step 39 | overrides: 40 | environment: 41 | MORE: things 42 | OTHER: stuff 43 | tooling: 44 | php: 45 | service: defaults 46 | node: 47 | service: :host 48 | options: 49 | host: 50 | description: The service to use 51 | default: cli 52 | alias: 53 | - h 54 | 55 | # This is important because it lets lando know to test against the plugin in this repo 56 | # DO NOT REMOVE THIS! 57 | plugins: 58 | "@lando/php": ../.. 59 | -------------------------------------------------------------------------------- /examples/8.2/README.md: -------------------------------------------------------------------------------- 1 | # PHP 8.2 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | 7 | And probably other stuff 8 | 9 | ## Start up tests 10 | 11 | Run the following commands to get up and running with this example. 12 | 13 | ```bash 14 | # Should start up successfully 15 | lando poweroff 16 | lando start 17 | ``` 18 | 19 | ## Verification commands 20 | 21 | Run the following commands to validate things are rolling as they should. 22 | 23 | ```bash 24 | # Should use 8.2 as the default php version 25 | lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.2" 26 | 27 | # Should use 13.x as the default postgresql-client version 28 | lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." 29 | 30 | # Should use apache 2.4 as the default webserver version 31 | lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." 32 | 33 | # Should only serve over http by default 34 | lando exec defaults -- curl https://localhost || echo $? | grep 7 35 | 36 | # Should serve from the app root by default 37 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 38 | 39 | # Should have a 1G php mem limit on appserver 40 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 41 | 42 | # Should have COMPOSER_MEMORY_LIMIT set to -1 43 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 44 | 45 | # Should install composer 2.x by default 46 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 47 | 48 | # Should have unlimited memory for php for CLI opts 49 | lando php -i | grep memory_limit | grep -e "-1" 50 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 51 | 52 | # Should not enable xdebug by default 53 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 54 | 55 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 56 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 57 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 58 | 59 | # Should use specified php version if given 60 | lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.2" 61 | 62 | # Should install composer 2.2.18 if version number is set 63 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2.18" 64 | 65 | # Should serve via nginx if specified 66 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 67 | 68 | # Should serve via https if specified 69 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 70 | 71 | # Should enable xdebug if specified 72 | lando exec custom -- php -m | grep "xdebug" 73 | 74 | # Should not serve port 80 for cli 75 | lando exec cli -- curl http://localhost || echo $? | grep 7 76 | 77 | # Should use custom php ini if specified 78 | lando exec custom -- php -i | grep memory_limit | grep 514 79 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 80 | 81 | # Should serve and be accessible over ssl if specified 82 | lando exec custom_nginx -- curl https://localhost 83 | lando exec custom -- curl https://custom_nginx 84 | 85 | # Should inherit overrides from its generator 86 | lando exec custom -- env | grep DUALBLADE | grep maxim 87 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 88 | 89 | # Should be able to run build steps on lando managed nginx service 90 | # https://github.com/lando/lando/issues/1990 91 | lando exec custom_nginx -- cat /app/test/managed_build_step 92 | 93 | # Should be able to override lando managed nginx service 94 | # https://github.com/lando/lando/issues/1990 95 | lando exec custom_nginx -- env | grep OTHER | grep stuff 96 | lando exec custom_nginx -- env | grep MORE | grep things 97 | 98 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 99 | # https://github.com/lando/lando/issues/2192 100 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 101 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 102 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 103 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 104 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 105 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 106 | 107 | # Should allow cli services to specify a boot up command 108 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 109 | 110 | # Should not install composer when composer_version is false 111 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 112 | 113 | # Should have node14 installed in cli service 114 | lando node -v | tee >(cat 1>&2) | grep v18. 115 | ``` 116 | 117 | ## Destroy tests 118 | 119 | Run the following commands to trash this app like nothing ever happened. 120 | 121 | ```bash 122 | # Should be destroyed with success 123 | lando destroy -y 124 | lando poweroff 125 | ``` 126 | -------------------------------------------------------------------------------- /examples/8.2/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/8.2/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/8.2/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.2/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.2/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.2/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.3/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/8.3/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php83 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:8.3 8 | cli: 9 | type: php:8.3 10 | via: cli 11 | build_as_root: 12 | - curl -sL https://deb.nodesource.com/setup_14.x | bash - 13 | - apt-get update -y 14 | - apt-get install -y nodejs 15 | cliworker: 16 | type: php:8.3 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:8.3 22 | composer_version: "2.5.6" 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | xdebug: true 27 | config: 28 | php: config/php.ini 29 | overrides: 30 | image: devwithlando/php:8.3-fpm-5 31 | environment: 32 | DUALBLADE: maxim 33 | OTHER: thing 34 | custom_nginx: 35 | build_as_root: 36 | - apt-get update -y 37 | - apt-get install curl -y 38 | - mkdir -p /app/test && touch /app/test/managed_build_step 39 | overrides: 40 | environment: 41 | MORE: things 42 | OTHER: stuff 43 | tooling: 44 | php: 45 | service: defaults 46 | node: 47 | service: :host 48 | options: 49 | host: 50 | description: The service to use 51 | default: cli 52 | alias: 53 | - h 54 | 55 | # This is important because it lets lando know to test against the plugin in this repo 56 | # DO NOT REMOVE THIS! 57 | plugins: 58 | "@lando/php": ../.. 59 | -------------------------------------------------------------------------------- /examples/8.3/README.md: -------------------------------------------------------------------------------- 1 | # PHP 8.3 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | 7 | And probably other stuff 8 | 9 | ## Start up tests 10 | 11 | Run the following commands to get up and running with this example. 12 | 13 | ```bash 14 | # Should start up successfully 15 | lando poweroff 16 | lando start 17 | ``` 18 | 19 | ## Verification commands 20 | 21 | Run the following commands to validate things are rolling as they should. 22 | 23 | ```bash 24 | # Should use 8.3 as the default php version 25 | lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.3" 26 | 27 | # Should use 13.x as the default postgresql-client version 28 | lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." 29 | 30 | # Should use apache 2.4 as the default webserver version 31 | lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." 32 | 33 | # Should only serve over http by default 34 | lando exec defaults -- curl https://localhost || echo $? | grep 7 35 | 36 | # Should serve from the app root by default 37 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 38 | 39 | # Should have a 1G php mem limit on appserver 40 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 41 | 42 | # Should have COMPOSER_MEMORY_LIMIT set to -1 43 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 44 | 45 | # Should install composer 2.x by default 46 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 47 | 48 | # Should have unlimited memory for php for CLI opts 49 | lando php -i | grep memory_limit | grep -e "-1" 50 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 51 | 52 | # Should not enable xdebug by default 53 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 54 | 55 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 56 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 57 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 58 | 59 | # Should use specified php version if given 60 | lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.3" 61 | 62 | # Should install composer 2.5.6 if version number is set 63 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.5.6" 64 | 65 | # Should serve via nginx if specified 66 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 67 | 68 | # Should serve via https if specified 69 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 70 | 71 | # Should enable xdebug if specified 72 | lando exec custom -- php -m | grep "xdebug" 73 | 74 | # Should not serve port 80 for cli 75 | lando exec cli -- curl http://localhost || echo $? | grep 7 76 | 77 | # Should use custom php ini if specified 78 | lando exec custom -- php -i | grep memory_limit | grep 514 79 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 80 | 81 | # Should serve and be accessible over ssl if specified 82 | lando exec custom_nginx -- curl https://localhost 83 | lando exec custom -- curl https://custom_nginx 84 | 85 | # Should inherit overrides from its generator 86 | lando exec custom -- env | grep DUALBLADE | grep maxim 87 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 88 | 89 | # Should be able to run build steps on lando managed nginx service 90 | # https://github.com/lando/lando/issues/1990 91 | lando exec custom_nginx -- cat /app/test/managed_build_step 92 | 93 | # Should be able to override lando managed nginx service 94 | # https://github.com/lando/lando/issues/1990 95 | lando exec custom_nginx -- env | grep OTHER | grep stuff 96 | lando exec custom_nginx -- env | grep MORE | grep things 97 | 98 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 99 | # https://github.com/lando/lando/issues/2192 100 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 101 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 102 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 103 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 104 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 105 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 106 | 107 | # Should allow cli services to specify a boot up command 108 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 109 | 110 | # Should not install composer when composer_version is false 111 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 112 | 113 | # Should have node14 installed in cli service 114 | lando node -v | tee >(cat 1>&2) | grep v18. 115 | ``` 116 | 117 | ## Destroy tests 118 | 119 | Run the following commands to trash this app like nothing ever happened. 120 | 121 | ```bash 122 | # Should be destroyed with success 123 | lando destroy -y 124 | lando poweroff 125 | ``` 126 | -------------------------------------------------------------------------------- /examples/8.3/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/8.3/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/8.3/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.3/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.3/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.3/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.4/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/8.4/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php84 2 | events: 3 | post-start: 4 | - defaults: php -i | grep memory_limit | grep -e "-1" 5 | services: 6 | defaults: 7 | type: php:8.4 8 | cli: 9 | type: php:8.4 10 | via: cli 11 | build_as_root: 12 | - curl -sL https://deb.nodesource.com/setup_18.x | bash - 13 | - apt-get update -y 14 | - apt-get install -y nodejs 15 | cliworker: 16 | type: php:8.4 17 | composer_version: false 18 | via: cli 19 | command: sleep infinity 20 | custom: 21 | type: php:8.4 22 | composer_version: "2.5.6" 23 | via: nginx 24 | ssl: true 25 | webroot: web 26 | config: 27 | php: config/php.ini 28 | overrides: 29 | image: devwithlando/php:8.4-fpm-5 30 | environment: 31 | DUALBLADE: maxim 32 | OTHER: thing 33 | custom_nginx: 34 | build_as_root: 35 | - apt-get update -y 36 | - apt-get install curl -y 37 | - mkdir -p /app/test && touch /app/test/managed_build_step 38 | overrides: 39 | environment: 40 | MORE: things 41 | OTHER: stuff 42 | tooling: 43 | php: 44 | service: defaults 45 | node: 46 | service: :host 47 | options: 48 | host: 49 | description: The service to use 50 | default: cli 51 | alias: 52 | - h 53 | 54 | # This is important because it lets lando know to test against the plugin in this repo 55 | # DO NOT REMOVE THIS! 56 | plugins: 57 | "@lando/php": ../.. 58 | -------------------------------------------------------------------------------- /examples/8.4/README.md: -------------------------------------------------------------------------------- 1 | # PHP 8.4 Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | 7 | And probably other stuff 8 | 9 | ## Start up tests 10 | 11 | Run the following commands to get up and running with this example. 12 | 13 | ```bash 14 | # Should start up successfully 15 | lando poweroff 16 | lando start 17 | ``` 18 | 19 | ## Verification commands 20 | 21 | Run the following commands to validate things are rolling as they should. 22 | 23 | ```bash 24 | # Should use 8.4 as the default php version 25 | lando exec defaults -- php -v | tee >(cat 1>&2) | grep "PHP 8.4" 26 | 27 | # Should use 15.x as the default postgresql-client version 28 | lando exec defaults -- psql -V | tee >(cat 1>&2) | grep "15." 29 | 30 | # Should use apache 2.4 as the default webserver version 31 | lando exec defaults -- apachectl -V | tee >(cat 1>&2) | grep "2.4." 32 | 33 | # Should only serve over http by default 34 | lando exec defaults -- curl https://localhost || echo $? | grep 7 35 | 36 | # Should serve from the app root by default 37 | lando exec defaults -- curl http://localhost | grep "ROOTDIR" 38 | 39 | # Should have a 1G php mem limit on appserver 40 | lando exec defaults -- curl http://localhost | grep "memory_limit" | grep "1G" 41 | 42 | # Should have COMPOSER_MEMORY_LIMIT set to -1 43 | lando exec defaults -- env | grep "COMPOSER_MEMORY_LIMIT=-1" 44 | 45 | # Should install composer 2.x by default 46 | lando exec defaults -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 47 | 48 | # Should have unlimited memory for php for CLI opts 49 | lando php -i | grep memory_limit | grep -e "-1" 50 | lando exec defaults -- php -i | grep "memory_limit" | grep -e "-1" 51 | 52 | # Should not enable xdebug by default 53 | lando exec defaults -- php -m | grep xdebug || echo $? | grep 1 54 | 55 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 56 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 57 | lando exec custom_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 58 | 59 | # Should use specified php version if given 60 | lando exec custom -- php -v | tee >(cat 1>&2) | grep "PHP 8.4" 61 | 62 | # Should install composer 2.5.6 if version number is set 63 | lando exec custom -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.5.6" 64 | 65 | # Should serve via nginx if specified 66 | lando exec custom_nginx -- curl http://localhost | grep "WEBDIR" 67 | 68 | # Should serve via https if specified 69 | lando exec custom_nginx -- curl https://localhost | grep "WEBDIR" 70 | 71 | # Should not serve port 80 for cli 72 | lando exec cli -- curl http://localhost || echo $? | grep 7 73 | 74 | # Should use custom php ini if specified 75 | lando exec custom -- php -i | grep memory_limit | grep 514 76 | lando exec custom -- curl http://custom_nginx | grep html_errors | grep On | grep On 77 | 78 | # Should serve and be accessible over ssl if specified 79 | lando exec custom_nginx -- curl https://localhost 80 | lando exec custom -- curl https://custom_nginx 81 | 82 | # Should inherit overrides from its generator 83 | lando exec custom -- env | grep DUALBLADE | grep maxim 84 | lando exec custom_nginx -- env | grep DUALBLADE | grep maxim 85 | 86 | # Should be able to run build steps on lando managed nginx service 87 | # https://github.com/lando/lando/issues/1990 88 | lando exec custom_nginx -- cat /app/test/managed_build_step 89 | 90 | # Should be able to override lando managed nginx service 91 | # https://github.com/lando/lando/issues/1990 92 | lando exec custom_nginx -- env | grep OTHER | grep stuff 93 | lando exec custom_nginx -- env | grep MORE | grep things 94 | 95 | # Should set PATH_INFO and PATH_TRANSLATED if appropriate 96 | # https://github.com/lando/lando/issues/2192 97 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 98 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/web/a/b.php" 99 | lando exec custom_nginx -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 100 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_INFO | grep "/a/b.php" 101 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep PATH_TRANSLATED | grep "/app/a/b.php" 102 | lando exec defaults -- curl http://localhost/path_info.php/a/b.php | grep SCRIPT_NAME | grep "/path_info.php" 103 | 104 | # Should allow cli services to specify a boot up command 105 | lando info -s cliworker --deep | grep Cmd | grep sleep | grep infinity 106 | 107 | # Should not install composer when composer_version is false 108 | echo $(lando exec cliworker -- composer --version --no-ansi 2>&1) | grep "executable file not found" 109 | 110 | # Should have node 18 installed in cli service 111 | lando node -v | tee >(cat 1>&2) | grep v18. 112 | ``` 113 | 114 | ## Destroy tests 115 | 116 | Run the following commands to trash this app like nothing ever happened. 117 | 118 | ```bash 119 | # Should be destroyed with success 120 | lando destroy -y 121 | lando poweroff 122 | ``` 123 | -------------------------------------------------------------------------------- /examples/8.4/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/8.4/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/8.4/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.4/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/8.4/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/8.4/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/composer/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | composer.lock 4 | test 5 | -------------------------------------------------------------------------------- /examples/composer/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-phpcomposer 2 | services: 3 | php72: 4 | type: php:7.2 5 | php83: 6 | type: php:8.3 7 | nocomposer: 8 | type: php:8.3 9 | composer_version: false 10 | composer1: 11 | type: php:7.4 12 | composer_version: 1 13 | composer2: 14 | type: php:8.3 15 | composer_version: 2 16 | composer1latest: 17 | type: php:8.3 18 | composer_version: 1-latest 19 | composer2latest: 20 | type: php:8.3 21 | composer_version: 2-latest 22 | composer1ver: 23 | type: php:8.3 24 | composer_version: '1.10.21' 25 | composer2ver: 26 | type: php:8.3 27 | composer_version: '2.1.10' 28 | composer22: 29 | type: php:8.3 30 | composer_version: 2.2 31 | composer22latest: 32 | type: php 33 | composer_version: 2.2-latest 34 | composer22ver: 35 | type: php:8.3 36 | composer_version: '2.2.10' 37 | dependencies: 38 | type: php:8.3 39 | composer_version: 2 40 | composer: 41 | phpunit/phpunit: "*" 42 | 43 | # This is important because it lets lando know to test against the plugin in this repo 44 | # DO NOT REMOVE THIS! 45 | plugins: 46 | "@lando/php": ../.. 47 | -------------------------------------------------------------------------------- /examples/composer/README.md: -------------------------------------------------------------------------------- 1 | # PHP Composer Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | * [Installing Composer](https://docs.lando.dev/config/php.html#installing-composer) 7 | 8 | And probably other stuff 9 | 10 | ## Start up tests 11 | 12 | Run the following commands to get up and running with this example. 13 | 14 | ```bash 15 | # Should start up successfully 16 | lando poweroff 17 | lando start 18 | ``` 19 | 20 | ## Verification commands 21 | 22 | Run the following commands to validate things are rolling as they should. 23 | 24 | ```bash 25 | # PHP 7.2 Should install composer 2.2.x by default 26 | lando exec php72 -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2." 27 | 28 | # PHP 8.3 Should install composer 2.8.x by default 29 | lando exec php83 -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.8." 30 | 31 | # Should not install composer if composer_version is false 32 | echo $(lando exec nocomposer -- composer --version --no-ansi 2>&1) | grep "executable file not found" 33 | 34 | # Should install composer 1.x if composer_version set to 1 35 | lando exec composer1 -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1." 36 | 37 | # Should install composer 1.x if composer_version set to 1-latest 38 | lando exec composer1latest -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1." 39 | 40 | # Should install composer 1.10.21 if composer_version set to specific version 41 | lando exec composer1ver -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 1.10.21" 42 | 43 | # Should install composer 2.x if composer_version set to 2 44 | lando exec composer2 -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 45 | 46 | # Should install composer 2.x if composer_version set to 2-latest 47 | lando exec composer2latest -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2." 48 | 49 | # Should install composer 2.1.10 if composer_version set to specific version 50 | lando exec composer2ver -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.1.10" 51 | 52 | # Should install composer 2.2.x if composer_version set to 2.2 53 | lando exec composer22 -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2." 54 | 55 | # Should install composer 2.2.x if composer_version set to 2.2-latest 56 | lando exec composer22latest -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2." 57 | 58 | # Should install composer 2.2.10 if composer_version set to 2.2.10 59 | lando exec composer22ver -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.2.10" 60 | 61 | # Should install compose global dependencies if specified by user and have them available in PATH 62 | lando exec dependencies -- phpunit --version 63 | lando exec dependencies -- which phpunit | grep "/var/www/.composer/vendor/bin/phpunit" 64 | 65 | # Should PATH prefer composer dependency binaries installed in /app/vendor over global ones 66 | lando exec dependencies -- composer require phpunit/phpunit 67 | lando exec dependencies -- phpunit --version 68 | lando exec dependencies -- which phpunit | grep "/app/vendor/bin/phpunit" 69 | lando exec dependencies -- composer remove phpunit/phpunit 70 | lando exec dependencies -- which phpunit | grep "/var/www/.composer/vendor/bin/phpunit" 71 | ``` 72 | 73 | ## Destroy tests 74 | 75 | Run the following commands to trash this app like nothing ever happened. 76 | 77 | ```bash 78 | # Should be destroyed with success 79 | lando destroy -y 80 | lando poweroff 81 | ``` 82 | -------------------------------------------------------------------------------- /examples/composer/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/custom/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/custom/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-phpcustom 2 | services: 3 | withnode: 4 | type: php:custom 5 | composer_version: false 6 | overrides: 7 | image: lando/php:7.4-with-node12 8 | build: 9 | context: ./ 10 | dockerfile: Dockerfile.node 11 | custom81: 12 | type: php:custom 13 | via: nginx:1.17 14 | ssl: true 15 | webroot: web 16 | config: 17 | php: config/php.ini 18 | pool: config/www.conf 19 | composer_version: '2.1.14' 20 | overrides: 21 | image: devwithlando/php:8.1-fpm-5 22 | tooling: 23 | node: 24 | service: :host 25 | options: 26 | host: 27 | description: The service to use 28 | default: withnode 29 | alias: 30 | - h 31 | 32 | # This is important because it lets lando know to test against the plugin in this repo 33 | # DO NOT REMOVE THIS! 34 | plugins: 35 | "@lando/php": ../.. 36 | -------------------------------------------------------------------------------- /examples/custom/Dockerfile.node: -------------------------------------------------------------------------------- 1 | FROM devwithlando/php:7.4-apache-5 2 | 3 | # Choose the major node version 4 | ENV NODE_VERSION=12 5 | 6 | # Install node 7 | RUN curl -sL "https://deb.nodesource.com/setup_${NODE_VERSION}.x" | bash - \ 8 | && apt-get install -y nodejs 9 | -------------------------------------------------------------------------------- /examples/custom/README.md: -------------------------------------------------------------------------------- 1 | # PHP Custom Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | * [Service Overrides](https://docs.lando.dev/config/services.html#advanced) 7 | 8 | And probably other stuff 9 | 10 | ## Start up tests 11 | 12 | Run the following commands to get up and running with this example. 13 | 14 | ```bash 15 | # Should start up successfully 16 | lando poweroff 17 | lando start 18 | ``` 19 | 20 | ## Verification commands 21 | 22 | Run the following commands to validate things are rolling as they should. 23 | 24 | ```bash 25 | # Should have node12 installed in withnode service 26 | lando node -v | grep v12. 27 | 28 | # Should use 7.4 as the php version 29 | lando exec withnode -- php -v | grep "PHP 7.4" 30 | 31 | # Should use 8.1 as the php version 32 | lando exec custom81 -- php -v | grep "PHP 8.1" 33 | 34 | # Should install composer 2.1.14 if version number is set 35 | lando exec custom81 -- composer --version --no-ansi | tee >(cat 1>&2) | grep -q "Composer version 2.1.14" 36 | 37 | # Should use nginx version 1.17.x as the webserver version 38 | lando exec custom81_nginx -- nginx -v 2>&1 | grep 1.17 39 | 40 | # Should have a PATH_INFO and PATH_TRANSLATED SERVER vars 41 | lando exec custom81_nginx -- curl https://localhost | grep SERVER | grep PATH_INFO 42 | lando exec custom81_nginx -- curl https://localhost | grep SERVER | grep PATH_TRANSLATED 43 | 44 | # Should serve via nginx if specified 45 | lando exec custom81_nginx -- curl http://localhost | grep "WEBDIR" 46 | 47 | # Should serve via https if specified 48 | lando exec custom81_nginx -- curl https://localhost | grep "WEBDIR" 49 | 50 | # Should use custom php ini if specified 51 | lando exec custom81 -- php -i | grep memory_limit | grep 514 52 | lando exec custom81 -- curl http://custom81_nginx | grep html_errors | grep On | grep On 53 | 54 | # Detect whether php-fpm is using custom www.conf 55 | lando exec custom81 -- ps axf | grep "php-fpm: pool www" | wc -l | grep 3 56 | ``` 57 | 58 | ## Destroy tests 59 | 60 | Run the following commands to trash this app like nothing ever happened. 61 | 62 | ```bash 63 | # Should be destroyed with success 64 | lando destroy -y 65 | lando poweroff 66 | ``` 67 | -------------------------------------------------------------------------------- /examples/custom/config/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 443 ssl; 3 | listen 80; 4 | listen [::]:80 default ipv6only=on; 5 | server_name localhost; 6 | 7 | ssl_certificate /certs/cert.crt; 8 | ssl_certificate_key /certs/cert.key; 9 | 10 | ssl_session_cache shared:SSL:1m; 11 | ssl_session_timeout 5m; 12 | 13 | ssl_ciphers HIGH:!aNULL:!MD5; 14 | ssl_prefer_server_ciphers on; 15 | 16 | root "{{LANDO_WEBROOT}}"; 17 | index index.php index.html index.htm; 18 | 19 | # hello 20 | location ~ \.php$ { 21 | fastcgi_pass fpm:9000; 22 | fastcgi_index index.php; 23 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 24 | fastcgi_buffers 256 128k; 25 | fastcgi_connect_timeout 300s; 26 | fastcgi_send_timeout 300s; 27 | fastcgi_read_timeout 300s; 28 | include fastcgi_params; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /examples/custom/config/php.ini: -------------------------------------------------------------------------------- 1 | [PHP] 2 | 3 | memory_limit = 514M 4 | html_errors = On 5 | -------------------------------------------------------------------------------- /examples/custom/config/www.conf: -------------------------------------------------------------------------------- 1 | ; Override default PHP-FPM settings. 2 | [www] 3 | pm.max_children = 5 4 | pm.start_servers = 3 5 | pm.min_spare_servers = 1 6 | pm.max_spare_servers = 3 7 | pm.max_requests = 500 8 | -------------------------------------------------------------------------------- /examples/custom/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/custom/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/custom/web/index.php: -------------------------------------------------------------------------------- 1 | WEBDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /examples/custom/web/path_info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/php-extensions/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | test 4 | -------------------------------------------------------------------------------- /examples/php-extensions/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-php-extensions 2 | services: 3 | 83scripted: 4 | type: php:8.3 5 | build_as_root: 6 | - install-php-extensions swoole 7 | buildsteps: 8 | type: php 9 | build_as_root: 10 | - apt-get update -y 11 | - apt install libxslt1-dev -y 12 | - pecl install stats-2.0.3 13 | - docker-php-ext-install xsl 14 | - docker-php-ext-enable stats 15 | dockerfile: 16 | type: php:custom 17 | overrides: 18 | image: lando/php:7.3-custom 19 | build: 20 | context: ./ 21 | dockerfile: Dockerfile.custom 22 | ports: 23 | - "80" 24 | 25 | # This is important because it lets lando know to test against the plugin in this repo 26 | # DO NOT REMOVE THIS! 27 | plugins: 28 | "@lando/php": ../.. 29 | -------------------------------------------------------------------------------- /examples/php-extensions/Dockerfile.custom: -------------------------------------------------------------------------------- 1 | FROM devwithlando/php:7.4-apache-5 2 | 3 | # Add php extension helper 4 | ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 5 | 6 | # Install Oracle Instantclient, OCI8 and Microsoft SQL Server extensions 7 | RUN chmod +x /usr/local/bin/install-php-extensions && sync && \ 8 | install-php-extensions oci8 sqlsrv pdo_sqlsrv 9 | -------------------------------------------------------------------------------- /examples/php-extensions/README.md: -------------------------------------------------------------------------------- 1 | # PHP Extensions Example 2 | 3 | This example exists primarily to test the following: 4 | 5 | * [Installing PHP Extensions on Lando](https://docs.lando.dev/guides/installing-php-extensions-on-lando.html) 6 | * [Issue #1894](https://github.com/lando/lando/pull/1894) 7 | * [Issue #1906](https://github.com/lando/lando/pull/1906) 8 | * [Issue #2201](https://github.com/lando/lando/pull/2201) 9 | * [Issue #2240](https://github.com/lando/lando/pull/2240) 10 | 11 | ## Start up tests 12 | 13 | Run the following commands to get up and running with this example. 14 | 15 | ```bash 16 | # Should start up successfully 17 | lando poweroff 18 | lando start 19 | ``` 20 | 21 | ## Verification commands 22 | 23 | Run the following commands to validate things are rolling as they should. 24 | 25 | ```bash 26 | # Should have installed the needed php extensions 27 | lando exec 83scripted -- php -m | grep swoole 28 | lando exec buildsteps -- php -m | grep stats 29 | lando exec buildsteps -- php -m | grep xsl 30 | lando exec dockerfile -- php -m | grep oci8 31 | lando exec dockerfile -- php -m | grep pdo_sqlsrv 32 | lando exec dockerfile -- php -m | grep sqlsrv 33 | ``` 34 | 35 | ## Destroy tests 36 | 37 | Run the following commands to trash this app like nothing ever happened. 38 | 39 | ```bash 40 | # Should be destroyed with success 41 | lando destroy -y 42 | lando poweroff 43 | ``` 44 | -------------------------------------------------------------------------------- /examples/php-extensions/index.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/xdebug/.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | composer.json 3 | composer.lock 4 | test 5 | -------------------------------------------------------------------------------- /examples/xdebug/.lando.yml: -------------------------------------------------------------------------------- 1 | name: lando-phpxdebug 2 | services: 3 | xdebug2: 4 | type: php:5.6 5 | xdebug: true 6 | xdebug3on: 7 | type: php 8 | xdebug: true 9 | xdebug3off: 10 | type: php 11 | xdebug: false 12 | xdebug3: 13 | type: php 14 | xdebug: "debug,develop" 15 | manual: 16 | type: php 17 | xdebug: true 18 | build_as_root: 19 | - pecl uninstall xdebug 20 | - pecl install xdebug-3.0.4 21 | 22 | # This is important because it lets lando know to test against the plugin in this repo 23 | # DO NOT REMOVE THIS! 24 | plugins: 25 | "@lando/php": ../.. 26 | -------------------------------------------------------------------------------- /examples/xdebug/README.md: -------------------------------------------------------------------------------- 1 | # PHP Xdebug Example 2 | 3 | This example exists primarily to test the following documentation: 4 | 5 | * [PHP Service](https://docs.lando.dev/config/php.html) 6 | * [Using XDebug](https://docs.lando.dev/config/php.html#using-xdebug) 7 | 8 | And probably other stuff 9 | 10 | ## Start up tests 11 | 12 | Run the following commands to get up and running with this example. 13 | 14 | ```bash 15 | # Should start up successfully 16 | lando poweroff 17 | lando start 18 | ``` 19 | 20 | ## Verification commands 21 | 22 | Run the following commands to validate things are rolling as they should. 23 | 24 | ```bash 25 | # Should enable xdebug 2 for php 5.6 26 | lando exec xdebug2 -- php --re xdebug | head -1 | grep "xdebug version 2." 27 | 28 | # Should enable xdebug 3 for php 7.2+ 29 | lando exec xdebug3on -- php --re xdebug | head -1 | grep "xdebug version 3." 30 | 31 | # Should not enable xdebug by when set to false 32 | lando exec xdebug3off -- php -m | grep xdebug || echo $? | grep 1 33 | 34 | # Should use develop, debug if defined 35 | lando exec xdebug3 -- env | grep 'XDEBUG_MODE' | grep 'debug,develop' 36 | 37 | # Should use xdebug version 3.0.4 if installed 38 | lando exec manual -- php --re xdebug | head -1 | grep "xdebug version 3.0.4" 39 | ``` 40 | 41 | ## Destroy tests 42 | 43 | Run the following commands to trash this app like nothing ever happened. 44 | 45 | ```bash 46 | # Should be destroyed with success 47 | lando destroy -y 48 | lando poweroff 49 | ``` 50 | -------------------------------------------------------------------------------- /examples/xdebug/index.php: -------------------------------------------------------------------------------- 1 | ROOTDIR 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/5.6-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:5.6-apache-5 . 2 | 3 | FROM php:5.6-apache-stretch 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ 9 | && sed -i '/stretch-updates/d' /etc/apt/sources.list \ 10 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 11 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 12 | && apt -y update && apt-get install -y \ 13 | gnupg2 \ 14 | wget \ 15 | bzip2 \ 16 | exiftool \ 17 | git-core \ 18 | imagemagick \ 19 | libbz2-dev \ 20 | libc-client2007e-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmagickwand-dev \ 25 | libmcrypt-dev \ 26 | libmemcached-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libxml2-dev \ 30 | libicu-dev \ 31 | mysql-client \ 32 | postgresql-client \ 33 | pv \ 34 | ssh \ 35 | unzip \ 36 | wget \ 37 | xfonts-base \ 38 | xfonts-75dpi \ 39 | zlib1g-dev \ 40 | && pecl install apcu-4.0.11 \ 41 | && pecl install imagick \ 42 | && pecl install memcached-2.2.0 \ 43 | && pecl install oauth-1.2.3 \ 44 | && pecl install redis-2.2.8 \ 45 | && pecl install xdebug-2.5.5 \ 46 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr \ 47 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 48 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 49 | && docker-php-ext-enable apcu \ 50 | && docker-php-ext-enable imagick \ 51 | && docker-php-ext-enable memcached \ 52 | && docker-php-ext-enable oauth \ 53 | && docker-php-ext-enable redis \ 54 | && docker-php-ext-install \ 55 | bcmath \ 56 | bz2 \ 57 | calendar \ 58 | exif \ 59 | gd \ 60 | imap \ 61 | ldap \ 62 | mcrypt \ 63 | mbstring \ 64 | mysql \ 65 | mysqli \ 66 | opcache \ 67 | pdo \ 68 | pdo_mysql \ 69 | pdo_pgsql \ 70 | soap \ 71 | zip \ 72 | intl \ 73 | gettext \ 74 | pcntl \ 75 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 76 | && apt-get -y clean \ 77 | && apt-get -y autoclean \ 78 | && apt-get -y autoremove \ 79 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 80 | -------------------------------------------------------------------------------- /images/5.6-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:5.6-fpm-5 . 2 | 3 | FROM php:5.6-fpm-stretch 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ 9 | && sed -i '/stretch-updates/d' /etc/apt/sources.list \ 10 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 11 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 12 | && apt -y update && apt-get install -y \ 13 | gnupg2 \ 14 | wget \ 15 | bzip2 \ 16 | exiftool \ 17 | git-core \ 18 | imagemagick \ 19 | libbz2-dev \ 20 | libc-client2007e-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmagickwand-dev \ 25 | libmcrypt-dev \ 26 | libmemcached-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libxml2-dev \ 30 | libicu-dev \ 31 | mysql-client \ 32 | postgresql-client \ 33 | pv \ 34 | ssh \ 35 | unzip \ 36 | wget \ 37 | xfonts-base \ 38 | xfonts-75dpi \ 39 | zlib1g-dev \ 40 | && pecl install apcu-4.0.11 \ 41 | && pecl install imagick \ 42 | && pecl install memcached-2.2.0 \ 43 | && pecl install oauth-1.2.3 \ 44 | && pecl install redis-2.2.8 \ 45 | && pecl install xdebug-2.5.5 \ 46 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr \ 47 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 48 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 49 | && docker-php-ext-enable apcu \ 50 | && docker-php-ext-enable imagick \ 51 | && docker-php-ext-enable memcached \ 52 | && docker-php-ext-enable oauth \ 53 | && docker-php-ext-enable redis \ 54 | && docker-php-ext-install \ 55 | bcmath \ 56 | bz2 \ 57 | calendar \ 58 | exif \ 59 | gd \ 60 | imap \ 61 | ldap \ 62 | mcrypt \ 63 | mbstring \ 64 | mysql \ 65 | mysqli \ 66 | opcache \ 67 | pdo \ 68 | pdo_mysql \ 69 | pdo_pgsql \ 70 | soap \ 71 | zip \ 72 | intl \ 73 | gettext \ 74 | pcntl \ 75 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 76 | && apt-get -y clean \ 77 | && apt-get -y autoclean \ 78 | && apt-get -y autoremove \ 79 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 80 | -------------------------------------------------------------------------------- /images/7.0-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.0-apache-5 . 2 | 3 | FROM php:7.0-apache-stretch 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ 9 | && sed -i '/stretch-updates/d' /etc/apt/sources.list \ 10 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 11 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 12 | && apt -y update && apt-get install -y \ 13 | gnupg2 \ 14 | wget \ 15 | bzip2 \ 16 | exiftool \ 17 | git-core \ 18 | imagemagick \ 19 | libbz2-dev \ 20 | libc-client2007e-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmagickwand-dev \ 25 | libmcrypt-dev \ 26 | libmemcached-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libwebp-dev \ 30 | libxml2-dev \ 31 | libicu-dev \ 32 | mysql-client \ 33 | postgresql-client \ 34 | pv \ 35 | ssh \ 36 | unzip \ 37 | wget \ 38 | xfonts-base \ 39 | xfonts-75dpi \ 40 | zlib1g-dev \ 41 | && pecl install apcu \ 42 | && pecl install imagick \ 43 | && pecl install memcached \ 44 | && pecl install oauth-2.0.2 \ 45 | && pecl install redis-3.1.2 \ 46 | && pecl install xdebug-2.9.0 \ 47 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 48 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 49 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 50 | && docker-php-ext-enable apcu \ 51 | && docker-php-ext-enable imagick \ 52 | && docker-php-ext-enable memcached \ 53 | && docker-php-ext-enable oauth \ 54 | && docker-php-ext-enable redis \ 55 | && docker-php-ext-install \ 56 | bcmath \ 57 | bz2 \ 58 | calendar \ 59 | exif \ 60 | gd \ 61 | imap \ 62 | ldap \ 63 | mcrypt \ 64 | mbstring \ 65 | mysqli \ 66 | opcache \ 67 | pdo \ 68 | pdo_mysql \ 69 | pdo_pgsql \ 70 | soap \ 71 | zip \ 72 | intl \ 73 | gettext \ 74 | pcntl \ 75 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 76 | && apt-get -y clean \ 77 | && apt-get -y autoclean \ 78 | && apt-get -y autoremove \ 79 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 80 | -------------------------------------------------------------------------------- /images/7.0-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.0-fpm-5 . 2 | 3 | FROM php:7.0-fpm-stretch 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list \ 9 | && sed -i '/stretch-updates/d' /etc/apt/sources.list \ 10 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 11 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 12 | && apt -y update && apt-get install -y \ 13 | gnupg2 \ 14 | wget \ 15 | bzip2 \ 16 | exiftool \ 17 | git-core \ 18 | imagemagick \ 19 | libbz2-dev \ 20 | libc-client2007e-dev \ 21 | libjpeg-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmagickwand-dev \ 25 | libmcrypt-dev \ 26 | libmemcached-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libwebp-dev \ 30 | libxml2-dev \ 31 | libicu-dev \ 32 | mysql-client \ 33 | postgresql-client \ 34 | pv \ 35 | ssh \ 36 | unzip \ 37 | wget \ 38 | xfonts-base \ 39 | xfonts-75dpi \ 40 | zlib1g-dev \ 41 | && pecl install apcu \ 42 | && pecl install imagick \ 43 | && pecl install memcached \ 44 | && pecl install oauth-2.0.2 \ 45 | && pecl install redis-3.1.2 \ 46 | && pecl install xdebug-2.9.0 \ 47 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 48 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 49 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 50 | && docker-php-ext-enable apcu \ 51 | && docker-php-ext-enable imagick \ 52 | && docker-php-ext-enable memcached \ 53 | && docker-php-ext-enable oauth \ 54 | && docker-php-ext-enable redis \ 55 | && docker-php-ext-install \ 56 | bcmath \ 57 | bz2 \ 58 | calendar \ 59 | exif \ 60 | gd \ 61 | imap \ 62 | ldap \ 63 | mcrypt \ 64 | mbstring \ 65 | mysqli \ 66 | opcache \ 67 | pdo \ 68 | pdo_mysql \ 69 | pdo_pgsql \ 70 | soap \ 71 | zip \ 72 | intl \ 73 | gettext \ 74 | pcntl \ 75 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 76 | && apt-get -y clean \ 77 | && apt-get -y autoclean \ 78 | && apt-get -y autoremove \ 79 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 80 | -------------------------------------------------------------------------------- /images/7.1-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.1-apache-5 . 2 | 3 | FROM php:7.1-apache-buster 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i '/security.debian.org/s/^/#/' /etc/apt/sources.list \ 9 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 10 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 11 | && apt-get update && apt-get install -y \ 12 | bzip2 \ 13 | default-mysql-client \ 14 | exiftool \ 15 | git-core \ 16 | gnupg2 \ 17 | imagemagick \ 18 | libbz2-dev \ 19 | libc-client-dev \ 20 | libicu-dev \ 21 | libjpeg62-turbo-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmcrypt-dev \ 25 | libmagickwand-dev \ 26 | libmemcached-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libssl-dev \ 30 | libwebp-dev \ 31 | libxml2-dev \ 32 | libzip-dev \ 33 | libonig-dev \ 34 | openssl \ 35 | postgresql-client-11 \ 36 | pv \ 37 | rsync \ 38 | ssh \ 39 | unzip \ 40 | wget \ 41 | xfonts-75dpi \ 42 | xfonts-base \ 43 | zlib1g-dev \ 44 | && pecl install apcu \ 45 | && pecl install imagick \ 46 | && pecl install memcached \ 47 | && pecl install oauth-2.0.2 \ 48 | && pecl install redis-3.1.2 \ 49 | && pecl install xdebug-2.9.8 \ 50 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 51 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 52 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 53 | && docker-php-ext-enable apcu \ 54 | && docker-php-ext-enable imagick \ 55 | && docker-php-ext-enable memcached \ 56 | && docker-php-ext-enable oauth \ 57 | && docker-php-ext-enable redis \ 58 | && docker-php-ext-install \ 59 | bcmath \ 60 | bz2 \ 61 | calendar \ 62 | exif \ 63 | gd \ 64 | imap \ 65 | ldap \ 66 | mcrypt \ 67 | mbstring \ 68 | mysqli \ 69 | opcache \ 70 | pdo \ 71 | pdo_mysql \ 72 | pdo_pgsql \ 73 | soap \ 74 | zip \ 75 | intl \ 76 | gettext \ 77 | pcntl \ 78 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 79 | && apt-get -y clean \ 80 | && apt-get -y autoclean \ 81 | && apt-get -y autoremove \ 82 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 83 | -------------------------------------------------------------------------------- /images/7.1-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.1-fpm-5 . 2 | 3 | FROM php:7.1-fpm-buster 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i '/security.debian.org/s/^/#/' /etc/apt/sources.list \ 9 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 10 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 11 | && apt-get update && apt-get install -y \ 12 | bzip2 \ 13 | default-mysql-client \ 14 | exiftool \ 15 | git-core \ 16 | gnupg2 \ 17 | imagemagick \ 18 | libbz2-dev \ 19 | libc-client-dev \ 20 | libicu-dev \ 21 | libjpeg62-turbo-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmcrypt-dev \ 25 | libmagickwand-dev \ 26 | libmemcached-dev \ 27 | libpng-dev \ 28 | libpq-dev \ 29 | libssl-dev \ 30 | libwebp-dev \ 31 | libxml2-dev \ 32 | libzip-dev \ 33 | libonig-dev \ 34 | openssl \ 35 | postgresql-client-11 \ 36 | pv \ 37 | rsync \ 38 | ssh \ 39 | unzip \ 40 | wget \ 41 | xfonts-75dpi \ 42 | xfonts-base \ 43 | zlib1g-dev \ 44 | && pecl install apcu \ 45 | && pecl install imagick \ 46 | && pecl install memcached \ 47 | && pecl install oauth-2.0.2 \ 48 | && pecl install redis-3.1.2 \ 49 | && pecl install xdebug-2.9.8 \ 50 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 51 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 52 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 53 | && docker-php-ext-enable apcu \ 54 | && docker-php-ext-enable imagick \ 55 | && docker-php-ext-enable memcached \ 56 | && docker-php-ext-enable oauth \ 57 | && docker-php-ext-enable redis \ 58 | && docker-php-ext-install \ 59 | bcmath \ 60 | bz2 \ 61 | calendar \ 62 | exif \ 63 | gd \ 64 | imap \ 65 | ldap \ 66 | mcrypt \ 67 | mbstring \ 68 | mysqli \ 69 | opcache \ 70 | pdo \ 71 | pdo_mysql \ 72 | pdo_pgsql \ 73 | soap \ 74 | zip \ 75 | intl \ 76 | gettext \ 77 | pcntl \ 78 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 79 | && apt-get -y clean \ 80 | && apt-get -y autoclean \ 81 | && apt-get -y autoremove \ 82 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 83 | -------------------------------------------------------------------------------- /images/7.2-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.2-apache-5 . 2 | 3 | FROM php:7.2-apache-buster 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i '/security.debian.org/s/^/#/' /etc/apt/sources.list \ 9 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 10 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 11 | && apt-get update && apt-get install -y \ 12 | bzip2 \ 13 | default-mysql-client \ 14 | exiftool \ 15 | git-core \ 16 | gnupg2 \ 17 | imagemagick \ 18 | libbz2-dev \ 19 | libc-client-dev \ 20 | libicu-dev \ 21 | libjpeg62-turbo-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmagickwand-dev \ 25 | libmemcached-dev \ 26 | libpng-dev \ 27 | libpq-dev \ 28 | libssl-dev \ 29 | libwebp-dev \ 30 | libxml2-dev \ 31 | libzip-dev \ 32 | libonig-dev \ 33 | openssl \ 34 | postgresql-client-11 \ 35 | pv \ 36 | rsync \ 37 | ssh \ 38 | unzip \ 39 | wget \ 40 | xfonts-75dpi \ 41 | xfonts-base \ 42 | zlib1g-dev \ 43 | && pecl install apcu \ 44 | && pecl install imagick \ 45 | && pecl install memcached \ 46 | && pecl install oauth-2.0.2 \ 47 | && pecl install redis-3.1.2 \ 48 | && pecl install xdebug-2.9.8 \ 49 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 50 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 51 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 52 | && docker-php-ext-enable apcu \ 53 | && docker-php-ext-enable imagick \ 54 | && docker-php-ext-enable memcached \ 55 | && docker-php-ext-enable oauth \ 56 | && docker-php-ext-enable redis \ 57 | && docker-php-ext-install \ 58 | bcmath \ 59 | bz2 \ 60 | calendar \ 61 | exif \ 62 | gd \ 63 | imap \ 64 | ldap \ 65 | mbstring \ 66 | mysqli \ 67 | opcache \ 68 | pdo \ 69 | pdo_mysql \ 70 | pdo_pgsql \ 71 | soap \ 72 | zip \ 73 | intl \ 74 | gettext \ 75 | pcntl \ 76 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 77 | && apt-get -y clean \ 78 | && apt-get -y autoclean \ 79 | && apt-get -y autoremove \ 80 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 81 | -------------------------------------------------------------------------------- /images/7.2-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.2-fpm-5 . 2 | 3 | FROM php:7.2-fpm-buster 4 | 5 | # Install dependencies we need 6 | RUN \ 7 | sed -i 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list \ 8 | && sed -i '/security.debian.org/s/^/#/' /etc/apt/sources.list \ 9 | && echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99ignore-release-date \ 10 | && mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 11 | && apt-get update && apt-get install -y \ 12 | bzip2 \ 13 | default-mysql-client \ 14 | exiftool \ 15 | git-core \ 16 | gnupg2 \ 17 | imagemagick \ 18 | libbz2-dev \ 19 | libc-client-dev \ 20 | libicu-dev \ 21 | libjpeg62-turbo-dev \ 22 | libkrb5-dev \ 23 | libldap2-dev \ 24 | libmagickwand-dev \ 25 | libmemcached-dev \ 26 | libpng-dev \ 27 | libpq-dev \ 28 | libssl-dev \ 29 | libwebp-dev \ 30 | libxml2-dev \ 31 | libzip-dev \ 32 | libonig-dev \ 33 | openssl \ 34 | postgresql-client-11 \ 35 | pv \ 36 | rsync \ 37 | ssh \ 38 | unzip \ 39 | wget \ 40 | xfonts-75dpi \ 41 | xfonts-base \ 42 | zlib1g-dev \ 43 | && pecl install apcu \ 44 | && pecl install imagick \ 45 | && pecl install memcached \ 46 | && pecl install oauth-2.0.2 \ 47 | && pecl install redis-3.1.2 \ 48 | && pecl install xdebug-2.9.8 \ 49 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 50 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 51 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 52 | && docker-php-ext-enable apcu \ 53 | && docker-php-ext-enable imagick \ 54 | && docker-php-ext-enable memcached \ 55 | && docker-php-ext-enable oauth \ 56 | && docker-php-ext-enable redis \ 57 | && docker-php-ext-install \ 58 | bcmath \ 59 | bz2 \ 60 | calendar \ 61 | exif \ 62 | gd \ 63 | imap \ 64 | ldap \ 65 | mbstring \ 66 | mysqli \ 67 | opcache \ 68 | pdo \ 69 | pdo_mysql \ 70 | pdo_pgsql \ 71 | soap \ 72 | zip \ 73 | intl \ 74 | gettext \ 75 | pcntl \ 76 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 77 | && apt-get -y clean \ 78 | && apt-get -y autoclean \ 79 | && apt-get -y autoremove \ 80 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 81 | -------------------------------------------------------------------------------- /images/7.3-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.3-apache-5 . 2 | 3 | FROM php:7.3-apache-bullseye 4 | 5 | # Install dependencies we need 6 | RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 7 | && apt -y update && apt-get install -y \ 8 | bzip2 \ 9 | default-mysql-client \ 10 | exiftool \ 11 | git-core \ 12 | gnupg2 \ 13 | imagemagick \ 14 | libbz2-dev \ 15 | libc-client-dev \ 16 | libicu-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libldap2-dev \ 20 | libmagickwand-dev \ 21 | libmemcached-dev \ 22 | libpng-dev \ 23 | libpq-dev \ 24 | libssl-dev \ 25 | libwebp-dev \ 26 | libxml2-dev \ 27 | libzip-dev \ 28 | libonig-dev \ 29 | openssl \ 30 | postgresql-client-13 \ 31 | pv \ 32 | rsync \ 33 | ssh \ 34 | unzip \ 35 | wget \ 36 | xfonts-75dpi \ 37 | xfonts-base \ 38 | zlib1g-dev \ 39 | && pecl install apcu \ 40 | && pecl install imagick \ 41 | && pecl install memcached \ 42 | && pecl install oauth-2.0.3 \ 43 | && pecl install redis-4.2.0 \ 44 | && pecl install xdebug-3.1.6 \ 45 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 46 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 47 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 48 | && docker-php-ext-enable apcu \ 49 | && docker-php-ext-enable imagick \ 50 | && docker-php-ext-enable memcached \ 51 | && docker-php-ext-enable oauth \ 52 | && docker-php-ext-enable redis \ 53 | && docker-php-ext-install \ 54 | bcmath \ 55 | bz2 \ 56 | calendar \ 57 | exif \ 58 | gd \ 59 | imap \ 60 | ldap \ 61 | mbstring \ 62 | mysqli \ 63 | opcache \ 64 | pdo \ 65 | pdo_mysql \ 66 | pdo_pgsql \ 67 | soap \ 68 | zip \ 69 | intl \ 70 | gettext \ 71 | pcntl \ 72 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 73 | && apt-get -y clean \ 74 | && apt-get -y autoclean \ 75 | && apt-get -y autoremove \ 76 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 77 | -------------------------------------------------------------------------------- /images/7.3-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.3-fpm-5 . 2 | 3 | FROM php:7.3-fpm-bullseye 4 | 5 | # Install dependencies we need 6 | RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 7 | && apt -y update && apt-get install -y \ 8 | bzip2 \ 9 | default-mysql-client \ 10 | exiftool \ 11 | git-core \ 12 | gnupg2 \ 13 | imagemagick \ 14 | libbz2-dev \ 15 | libc-client-dev \ 16 | libicu-dev \ 17 | libjpeg62-turbo-dev \ 18 | libkrb5-dev \ 19 | libldap2-dev \ 20 | libmagickwand-dev \ 21 | libmemcached-dev \ 22 | libpng-dev \ 23 | libpq-dev \ 24 | libssl-dev \ 25 | libwebp-dev \ 26 | libxml2-dev \ 27 | libzip-dev \ 28 | libonig-dev \ 29 | openssl \ 30 | postgresql-client-13 \ 31 | pv \ 32 | rsync \ 33 | ssh \ 34 | unzip \ 35 | wget \ 36 | xfonts-75dpi \ 37 | xfonts-base \ 38 | zlib1g-dev \ 39 | && pecl install apcu \ 40 | && pecl install imagick \ 41 | && pecl install memcached \ 42 | && pecl install oauth-2.0.3 \ 43 | && pecl install redis-4.2.0 \ 44 | && pecl install xdebug-3.1.6 \ 45 | && docker-php-ext-configure gd --with-freetype-dir=/usr --with-png-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr \ 46 | && docker-php-ext-configure imap --with-imap-ssl --with-kerberos \ 47 | && docker-php-ext-configure ldap --with-libdir=lib/$(uname -m)-linux-gnu/ \ 48 | && docker-php-ext-enable apcu \ 49 | && docker-php-ext-enable imagick \ 50 | && docker-php-ext-enable memcached \ 51 | && docker-php-ext-enable oauth \ 52 | && docker-php-ext-enable redis \ 53 | && docker-php-ext-install \ 54 | bcmath \ 55 | bz2 \ 56 | calendar \ 57 | exif \ 58 | gd \ 59 | imap \ 60 | ldap \ 61 | mbstring \ 62 | mysqli \ 63 | opcache \ 64 | pdo \ 65 | pdo_mysql \ 66 | pdo_pgsql \ 67 | soap \ 68 | zip \ 69 | intl \ 70 | gettext \ 71 | pcntl \ 72 | && chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 73 | && apt-get -y clean \ 74 | && apt-get -y autoclean \ 75 | && apt-get -y autoremove \ 76 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 77 | -------------------------------------------------------------------------------- /images/7.4-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.4-apache-5 . 2 | 3 | FROM php:7.4-apache-bullseye 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 14 | && apt -y update && apt-get install -y \ 15 | default-mysql-client \ 16 | exiftool \ 17 | git-core \ 18 | gnupg2 \ 19 | imagemagick \ 20 | libonig-dev \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-13 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget \ 29 | xfonts-75dpi \ 30 | xfonts-base 31 | 32 | RUN \ 33 | install-php-extensions @fix_letsencrypt \ 34 | && install-php-extensions apcu \ 35 | && install-php-extensions bcmath \ 36 | && install-php-extensions bz2 \ 37 | && install-php-extensions calendar \ 38 | && install-php-extensions exif \ 39 | && install-php-extensions gd \ 40 | && install-php-extensions gettext \ 41 | && install-php-extensions imagick \ 42 | && install-php-extensions imap \ 43 | && install-php-extensions intl \ 44 | && install-php-extensions ldap \ 45 | && install-php-extensions mbstring \ 46 | && install-php-extensions memcached \ 47 | && install-php-extensions mysqli \ 48 | && install-php-extensions oauth \ 49 | && install-php-extensions opcache \ 50 | && install-php-extensions pcntl \ 51 | && install-php-extensions pdo \ 52 | && install-php-extensions pdo_mysql \ 53 | && install-php-extensions pdo_pgsql \ 54 | && install-php-extensions redis \ 55 | && install-php-extensions soap \ 56 | && install-php-extensions xhprof \ 57 | && install-php-extensions zip 58 | 59 | # Install xdebug but disable it by default 60 | RUN install-php-extensions xdebug \ 61 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 62 | 63 | RUN \ 64 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 65 | && apt-get -y clean \ 66 | && apt-get -y autoclean \ 67 | && apt-get -y autoremove \ 68 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 69 | -------------------------------------------------------------------------------- /images/7.4-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:7.4-fpm-5 . 2 | 3 | FROM php:7.4-fpm-bullseye 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 14 | && apt -y update && apt-get install -y \ 15 | default-mysql-client \ 16 | exiftool \ 17 | git-core \ 18 | gnupg2 \ 19 | imagemagick \ 20 | libonig-dev \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-13 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget \ 29 | xfonts-75dpi \ 30 | xfonts-base 31 | 32 | RUN \ 33 | install-php-extensions @fix_letsencrypt \ 34 | && install-php-extensions apcu \ 35 | && install-php-extensions bcmath \ 36 | && install-php-extensions bz2 \ 37 | && install-php-extensions calendar \ 38 | && install-php-extensions exif \ 39 | && install-php-extensions gd \ 40 | && install-php-extensions gettext \ 41 | && install-php-extensions imagick \ 42 | && install-php-extensions imap \ 43 | && install-php-extensions intl \ 44 | && install-php-extensions ldap \ 45 | && install-php-extensions mbstring \ 46 | && install-php-extensions memcached \ 47 | && install-php-extensions mysqli \ 48 | && install-php-extensions oauth \ 49 | && install-php-extensions opcache \ 50 | && install-php-extensions pcntl \ 51 | && install-php-extensions pdo \ 52 | && install-php-extensions pdo_mysql \ 53 | && install-php-extensions pdo_pgsql \ 54 | && install-php-extensions redis \ 55 | && install-php-extensions soap \ 56 | && install-php-extensions xhprof \ 57 | && install-php-extensions zip 58 | 59 | # Install xdebug but disable it by default 60 | RUN install-php-extensions xdebug \ 61 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 62 | 63 | RUN \ 64 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 65 | && apt-get -y clean \ 66 | && apt-get -y autoclean \ 67 | && apt-get -y autoremove \ 68 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 69 | -------------------------------------------------------------------------------- /images/8.0-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.0-apache-5 . 2 | 3 | FROM php:8.0-apache-bullseye 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 14 | && apt -y update && apt-get install -y \ 15 | default-mysql-client \ 16 | exiftool \ 17 | git-core \ 18 | gnupg2 \ 19 | imagemagick \ 20 | libonig-dev \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-13 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget \ 29 | xfonts-75dpi \ 30 | xfonts-base 31 | 32 | RUN \ 33 | install-php-extensions @fix_letsencrypt \ 34 | && install-php-extensions apcu \ 35 | && install-php-extensions bcmath \ 36 | && install-php-extensions bz2 \ 37 | && install-php-extensions calendar \ 38 | && install-php-extensions exif \ 39 | && install-php-extensions gd \ 40 | && install-php-extensions gettext \ 41 | && install-php-extensions imagick \ 42 | && install-php-extensions imap \ 43 | && install-php-extensions intl \ 44 | && install-php-extensions ldap \ 45 | && install-php-extensions mbstring \ 46 | && install-php-extensions memcached \ 47 | && install-php-extensions mysqli \ 48 | && install-php-extensions oauth \ 49 | && install-php-extensions opcache \ 50 | && install-php-extensions pcntl \ 51 | && install-php-extensions pdo \ 52 | && install-php-extensions pdo_mysql \ 53 | && install-php-extensions pdo_pgsql \ 54 | && install-php-extensions redis \ 55 | && install-php-extensions soap \ 56 | && install-php-extensions xhprof \ 57 | && install-php-extensions zip 58 | 59 | # Install xdebug but disable it by default 60 | RUN install-php-extensions xdebug \ 61 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 62 | 63 | RUN \ 64 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 65 | && apt-get -y clean \ 66 | && apt-get -y autoclean \ 67 | && apt-get -y autoremove \ 68 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 69 | -------------------------------------------------------------------------------- /images/8.0-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.0-fpm-5 . 2 | 3 | FROM php:8.0-fpm-bullseye 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.5/debian bullseye main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 14 | && apt -y update && apt-get install -y \ 15 | default-mysql-client \ 16 | exiftool \ 17 | git-core \ 18 | gnupg2 \ 19 | imagemagick \ 20 | libonig-dev \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-13 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget \ 29 | xfonts-75dpi \ 30 | xfonts-base 31 | 32 | RUN \ 33 | install-php-extensions @fix_letsencrypt \ 34 | && install-php-extensions apcu \ 35 | && install-php-extensions bcmath \ 36 | && install-php-extensions bz2 \ 37 | && install-php-extensions calendar \ 38 | && install-php-extensions exif \ 39 | && install-php-extensions gd \ 40 | && install-php-extensions gettext \ 41 | && install-php-extensions imagick \ 42 | && install-php-extensions imap \ 43 | && install-php-extensions intl \ 44 | && install-php-extensions ldap \ 45 | && install-php-extensions mbstring \ 46 | && install-php-extensions memcached \ 47 | && install-php-extensions mysqli \ 48 | && install-php-extensions oauth \ 49 | && install-php-extensions opcache \ 50 | && install-php-extensions pcntl \ 51 | && install-php-extensions pdo \ 52 | && install-php-extensions pdo_mysql \ 53 | && install-php-extensions pdo_pgsql \ 54 | && install-php-extensions redis \ 55 | && install-php-extensions soap \ 56 | && install-php-extensions xhprof \ 57 | && install-php-extensions zip 58 | 59 | # Install xdebug but disable it by default 60 | RUN install-php-extensions xdebug \ 61 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 62 | 63 | RUN \ 64 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 65 | && apt-get -y clean \ 66 | && apt-get -y autoclean \ 67 | && apt-get -y autoremove \ 68 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 69 | -------------------------------------------------------------------------------- /images/8.1-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.1-apache-5 . 2 | 3 | FROM php:8.1-apache-bookworm 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN \ 14 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 15 | && apt -y update && apt-get install -y \ 16 | default-mysql-client \ 17 | exiftool \ 18 | git-core \ 19 | gnupg2 \ 20 | imagemagick \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-15 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget 29 | 30 | RUN \ 31 | install-php-extensions @fix_letsencrypt \ 32 | && install-php-extensions apcu \ 33 | && install-php-extensions bcmath \ 34 | && install-php-extensions bz2 \ 35 | && install-php-extensions calendar \ 36 | && install-php-extensions exif \ 37 | && install-php-extensions gd \ 38 | && install-php-extensions gettext \ 39 | && install-php-extensions imagick \ 40 | && install-php-extensions imap \ 41 | && install-php-extensions intl \ 42 | && install-php-extensions ldap \ 43 | && install-php-extensions mbstring \ 44 | && install-php-extensions memcached \ 45 | && install-php-extensions mysqli \ 46 | && install-php-extensions oauth \ 47 | && install-php-extensions opcache \ 48 | && install-php-extensions pcntl \ 49 | && install-php-extensions pdo \ 50 | && install-php-extensions pdo_mysql \ 51 | && install-php-extensions pdo_pgsql \ 52 | && install-php-extensions redis \ 53 | && install-php-extensions soap \ 54 | && install-php-extensions xhprof \ 55 | && install-php-extensions zip 56 | 57 | # Install xdebug but disable it by default 58 | RUN install-php-extensions xdebug \ 59 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 60 | 61 | RUN \ 62 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 63 | && apt-get -y clean \ 64 | && apt-get -y autoclean \ 65 | && apt-get -y autoremove \ 66 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 67 | -------------------------------------------------------------------------------- /images/8.1-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.1-fpm-5 . 2 | 3 | FROM php:8.1-fpm-bookworm 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN \ 14 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 15 | && apt -y update && apt-get install -y \ 16 | default-mysql-client \ 17 | exiftool \ 18 | git-core \ 19 | gnupg2 \ 20 | imagemagick \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-15 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget 29 | 30 | RUN \ 31 | install-php-extensions @fix_letsencrypt \ 32 | && install-php-extensions apcu \ 33 | && install-php-extensions bcmath \ 34 | && install-php-extensions bz2 \ 35 | && install-php-extensions calendar \ 36 | && install-php-extensions exif \ 37 | && install-php-extensions gd \ 38 | && install-php-extensions gettext \ 39 | && install-php-extensions imagick \ 40 | && install-php-extensions imap \ 41 | && install-php-extensions intl \ 42 | && install-php-extensions ldap \ 43 | && install-php-extensions mbstring \ 44 | && install-php-extensions memcached \ 45 | && install-php-extensions mysqli \ 46 | && install-php-extensions oauth \ 47 | && install-php-extensions opcache \ 48 | && install-php-extensions pcntl \ 49 | && install-php-extensions pdo \ 50 | && install-php-extensions pdo_mysql \ 51 | && install-php-extensions pdo_pgsql \ 52 | && install-php-extensions redis \ 53 | && install-php-extensions soap \ 54 | && install-php-extensions xhprof \ 55 | && install-php-extensions zip 56 | 57 | # Install xdebug but disable it by default 58 | RUN install-php-extensions xdebug \ 59 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 60 | 61 | RUN \ 62 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 63 | && apt-get -y clean \ 64 | && apt-get -y autoclean \ 65 | && apt-get -y autoremove \ 66 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 67 | -------------------------------------------------------------------------------- /images/8.2-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.2-apache-5 . 2 | 3 | FROM php:8.2-apache-bookworm 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN \ 14 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 15 | && apt -y update && apt-get install -y \ 16 | default-mysql-client \ 17 | exiftool \ 18 | git-core \ 19 | gnupg2 \ 20 | imagemagick \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-15 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget 29 | 30 | RUN \ 31 | install-php-extensions @fix_letsencrypt \ 32 | && install-php-extensions apcu \ 33 | && install-php-extensions bcmath \ 34 | && install-php-extensions bz2 \ 35 | && install-php-extensions calendar \ 36 | && install-php-extensions exif \ 37 | && install-php-extensions gd \ 38 | && install-php-extensions gettext \ 39 | && install-php-extensions imagick \ 40 | && install-php-extensions imap \ 41 | && install-php-extensions intl \ 42 | && install-php-extensions ldap \ 43 | && install-php-extensions mbstring \ 44 | && install-php-extensions memcached \ 45 | && install-php-extensions mysqli \ 46 | && install-php-extensions oauth \ 47 | && install-php-extensions opcache \ 48 | && install-php-extensions pcntl \ 49 | && install-php-extensions pdo \ 50 | && install-php-extensions pdo_mysql \ 51 | && install-php-extensions pdo_pgsql \ 52 | && install-php-extensions redis \ 53 | && install-php-extensions soap \ 54 | && install-php-extensions xhprof \ 55 | && install-php-extensions zip 56 | 57 | # Install xdebug but disable it by default 58 | RUN install-php-extensions xdebug \ 59 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 60 | 61 | RUN \ 62 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 63 | && apt-get -y clean \ 64 | && apt-get -y autoclean \ 65 | && apt-get -y autoremove \ 66 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 67 | -------------------------------------------------------------------------------- /images/8.2-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.2-fpm-5 . 2 | 3 | FROM php:8.2-fpm-bookworm 4 | 5 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 6 | 7 | RUN \ 8 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 9 | mkdir -p /etc/apt/keyrings \ 10 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 11 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 12 | 13 | RUN \ 14 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 15 | && apt -y update && apt-get install -y \ 16 | default-mysql-client \ 17 | exiftool \ 18 | git-core \ 19 | gnupg2 \ 20 | imagemagick \ 21 | mariadb-client \ 22 | openssl \ 23 | postgresql-client-15 \ 24 | pv \ 25 | rsync \ 26 | ssh \ 27 | unzip \ 28 | wget 29 | 30 | RUN \ 31 | install-php-extensions @fix_letsencrypt \ 32 | && install-php-extensions apcu \ 33 | && install-php-extensions bcmath \ 34 | && install-php-extensions bz2 \ 35 | && install-php-extensions calendar \ 36 | && install-php-extensions exif \ 37 | && install-php-extensions gd \ 38 | && install-php-extensions gettext \ 39 | && install-php-extensions imagick \ 40 | && install-php-extensions imap \ 41 | && install-php-extensions intl \ 42 | && install-php-extensions ldap \ 43 | && install-php-extensions mbstring \ 44 | && install-php-extensions memcached \ 45 | && install-php-extensions mysqli \ 46 | && install-php-extensions oauth \ 47 | && install-php-extensions opcache \ 48 | && install-php-extensions pcntl \ 49 | && install-php-extensions pdo \ 50 | && install-php-extensions pdo_mysql \ 51 | && install-php-extensions pdo_pgsql \ 52 | && install-php-extensions redis \ 53 | && install-php-extensions soap \ 54 | && install-php-extensions xhprof \ 55 | && install-php-extensions zip 56 | 57 | # Install xdebug but disable it by default 58 | RUN install-php-extensions xdebug \ 59 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 60 | 61 | RUN \ 62 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 63 | && apt-get -y clean \ 64 | && apt-get -y autoclean \ 65 | && apt-get -y autoremove \ 66 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 67 | -------------------------------------------------------------------------------- /images/8.3-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.3-apache-5 . 2 | 3 | FROM php:8.3-apache-bookworm 4 | 5 | ARG TARGETARCH 6 | 7 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 8 | 9 | RUN \ 10 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 11 | mkdir -p /etc/apt/keyrings \ 12 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 13 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 14 | 15 | # Drupal 11 requires sqlite3 3.45+ 16 | ARG SQLITE_VERSION=3.45.1 17 | RUN \ 18 | curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 19 | && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 20 | && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb" 21 | 22 | RUN \ 23 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 24 | && apt -y update && apt-get install -y \ 25 | default-mysql-client \ 26 | exiftool \ 27 | git-core \ 28 | gnupg2 \ 29 | imagemagick \ 30 | postgresql-client-15 \ 31 | pv \ 32 | rsync \ 33 | ssh \ 34 | unzip \ 35 | wget \ 36 | /tmp/sqlite3.deb \ 37 | /tmp/libsqlite3-0.deb \ 38 | /tmp/libsqlite3-dev.deb 39 | 40 | RUN \ 41 | install-php-extensions @fix_letsencrypt \ 42 | && install-php-extensions apcu \ 43 | && install-php-extensions bcmath \ 44 | && install-php-extensions bz2 \ 45 | && install-php-extensions calendar \ 46 | && install-php-extensions exif \ 47 | && install-php-extensions gd \ 48 | && install-php-extensions gettext \ 49 | && install-php-extensions imagick \ 50 | && install-php-extensions imap \ 51 | && install-php-extensions intl \ 52 | && install-php-extensions ldap \ 53 | && install-php-extensions mbstring \ 54 | && install-php-extensions memcached \ 55 | && install-php-extensions mysqli \ 56 | && install-php-extensions oauth \ 57 | && install-php-extensions opcache \ 58 | && install-php-extensions pcntl \ 59 | && install-php-extensions pdo \ 60 | && install-php-extensions pdo_mysql \ 61 | && install-php-extensions pdo_pgsql \ 62 | && install-php-extensions redis \ 63 | && install-php-extensions soap \ 64 | && install-php-extensions xhprof \ 65 | && install-php-extensions zip 66 | 67 | # Install xdebug but disable it by default 68 | RUN install-php-extensions xdebug \ 69 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 70 | 71 | RUN \ 72 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 73 | && apt-get -y clean \ 74 | && apt-get -y autoclean \ 75 | && apt-get -y autoremove \ 76 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 77 | -------------------------------------------------------------------------------- /images/8.3-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.3-fpm-5 . 2 | 3 | FROM php:8.3-fpm-bookworm 4 | 5 | ARG TARGETARCH 6 | 7 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 8 | 9 | RUN \ 10 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 11 | mkdir -p /etc/apt/keyrings \ 12 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 13 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/10.11/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 14 | 15 | # Drupal 11 requires sqlite3 3.45+ 16 | ARG SQLITE_VERSION=3.45.1 17 | RUN \ 18 | curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 19 | && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 20 | && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb" 21 | 22 | RUN \ 23 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 24 | && apt -y update && apt-get install -y \ 25 | default-mysql-client \ 26 | exiftool \ 27 | git-core \ 28 | gnupg2 \ 29 | imagemagick \ 30 | mariadb-client \ 31 | postgresql-client-15 \ 32 | pv \ 33 | rsync \ 34 | ssh \ 35 | unzip \ 36 | wget \ 37 | /tmp/sqlite3.deb \ 38 | /tmp/libsqlite3-0.deb \ 39 | /tmp/libsqlite3-dev.deb 40 | 41 | RUN \ 42 | install-php-extensions @fix_letsencrypt \ 43 | && install-php-extensions apcu \ 44 | && install-php-extensions bcmath \ 45 | && install-php-extensions bz2 \ 46 | && install-php-extensions calendar \ 47 | && install-php-extensions exif \ 48 | && install-php-extensions gd \ 49 | && install-php-extensions gettext \ 50 | && install-php-extensions imagick \ 51 | && install-php-extensions imap \ 52 | && install-php-extensions intl \ 53 | && install-php-extensions ldap \ 54 | && install-php-extensions mbstring \ 55 | && install-php-extensions memcached \ 56 | && install-php-extensions mysqli \ 57 | && install-php-extensions oauth \ 58 | && install-php-extensions opcache \ 59 | && install-php-extensions pcntl \ 60 | && install-php-extensions pdo \ 61 | && install-php-extensions pdo_mysql \ 62 | && install-php-extensions pdo_pgsql \ 63 | && install-php-extensions redis \ 64 | && install-php-extensions soap \ 65 | && install-php-extensions xhprof \ 66 | && install-php-extensions zip 67 | 68 | # Install xdebug but disable it by default 69 | RUN install-php-extensions xdebug \ 70 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 71 | 72 | RUN \ 73 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 74 | && apt-get -y clean \ 75 | && apt-get -y autoclean \ 76 | && apt-get -y autoremove \ 77 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 78 | -------------------------------------------------------------------------------- /images/8.4-apache/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.4-apache-5 . 2 | 3 | FROM php:8.4-apache-bookworm 4 | 5 | ARG TARGETARCH 6 | 7 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 8 | 9 | RUN \ 10 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 11 | mkdir -p /etc/apt/keyrings \ 12 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 13 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/11.4/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 14 | 15 | # Drupal 11 requires sqlite3 3.45+ 16 | ARG SQLITE_VERSION=3.45.1 17 | RUN \ 18 | curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 19 | && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 20 | && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb" 21 | 22 | RUN \ 23 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 24 | && apt -y update && apt-get install -y \ 25 | default-mysql-client \ 26 | exiftool \ 27 | git-core \ 28 | gnupg2 \ 29 | imagemagick \ 30 | mariadb-client \ 31 | mariadb-client-compat \ 32 | postgresql-client-15 \ 33 | pv \ 34 | rsync \ 35 | ssh \ 36 | unzip \ 37 | wget \ 38 | /tmp/sqlite3.deb \ 39 | /tmp/libsqlite3-0.deb \ 40 | /tmp/libsqlite3-dev.deb 41 | 42 | RUN \ 43 | install-php-extensions @fix_letsencrypt \ 44 | && install-php-extensions apcu \ 45 | && install-php-extensions bcmath \ 46 | && install-php-extensions bz2 \ 47 | && install-php-extensions calendar \ 48 | && install-php-extensions exif \ 49 | && install-php-extensions gd \ 50 | && install-php-extensions gettext \ 51 | && install-php-extensions imagick \ 52 | && install-php-extensions imap \ 53 | && install-php-extensions intl \ 54 | && install-php-extensions ldap \ 55 | && install-php-extensions mbstring \ 56 | && install-php-extensions memcached \ 57 | && install-php-extensions mysqli \ 58 | && install-php-extensions oauth \ 59 | && install-php-extensions opcache \ 60 | && install-php-extensions pcntl \ 61 | && install-php-extensions pdo \ 62 | && install-php-extensions pdo_mysql \ 63 | && install-php-extensions pdo_pgsql \ 64 | && install-php-extensions redis \ 65 | && install-php-extensions soap \ 66 | && install-php-extensions xhprof \ 67 | && install-php-extensions zip 68 | 69 | # Install xdebug but disable it by default 70 | RUN install-php-extensions xdebug \ 71 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 72 | 73 | RUN \ 74 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 75 | && apt-get -y clean \ 76 | && apt-get -y autoclean \ 77 | && apt-get -y autoremove \ 78 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 79 | -------------------------------------------------------------------------------- /images/8.4-fpm/Dockerfile: -------------------------------------------------------------------------------- 1 | # docker build -t devwithlando/php:8.4-fpm-5 . 2 | 3 | FROM php:8.4-fpm-bookworm 4 | 5 | ARG TARGETARCH 6 | 7 | ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ 8 | 9 | RUN \ 10 | # MariaDB client compatibility (https://github.com/lando/php/issues/120) 11 | mkdir -p /etc/apt/keyrings \ 12 | && curl -o /etc/apt/keyrings/mariadb-keyring.pgp 'https://mariadb.org/mariadb_release_signing_key.pgp' \ 13 | && echo "deb [signed-by=/etc/apt/keyrings/mariadb-keyring.pgp] https://mirror.mariadb.org/repo/11.4/debian bookworm main" > /etc/apt/sources.list.d/mariadb.list 14 | 15 | # Drupal 11 requires sqlite3 3.45+ 16 | ARG SQLITE_VERSION=3.45.1 17 | RUN \ 18 | curl -Lo /tmp/sqlite3.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/sqlite3_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 19 | && curl -Lo /tmp/libsqlite3-0.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-0_${SQLITE_VERSION}-1_${TARGETARCH}.deb" \ 20 | && curl -Lo /tmp/libsqlite3-dev.deb "https://snapshot.debian.org/archive/debian/20240506T211830Z/pool/main/s/sqlite3/libsqlite3-dev_${SQLITE_VERSION}-1_${TARGETARCH}.deb" 21 | 22 | RUN \ 23 | mkdir -p /usr/share/man/man1 /usr/share/man/man7 \ 24 | && apt -y update && apt-get install -y \ 25 | bzip2 \ 26 | default-mysql-client \ 27 | exiftool \ 28 | git-core \ 29 | gnupg2 \ 30 | imagemagick \ 31 | mariadb-client \ 32 | mariadb-client-compat \ 33 | postgresql-client-15 \ 34 | pv \ 35 | rsync \ 36 | ssh \ 37 | unzip \ 38 | wget \ 39 | /tmp/sqlite3.deb \ 40 | /tmp/libsqlite3-0.deb \ 41 | /tmp/libsqlite3-dev.deb 42 | 43 | RUN \ 44 | install-php-extensions @fix_letsencrypt \ 45 | && install-php-extensions apcu \ 46 | && install-php-extensions bcmath \ 47 | && install-php-extensions bz2 \ 48 | && install-php-extensions calendar \ 49 | && install-php-extensions exif \ 50 | && install-php-extensions gd \ 51 | && install-php-extensions gettext \ 52 | && install-php-extensions imagick \ 53 | && install-php-extensions imap \ 54 | && install-php-extensions intl \ 55 | && install-php-extensions ldap \ 56 | && install-php-extensions mbstring \ 57 | && install-php-extensions memcached \ 58 | && install-php-extensions mysqli \ 59 | && install-php-extensions oauth \ 60 | && install-php-extensions opcache \ 61 | && install-php-extensions pcntl \ 62 | && install-php-extensions pdo \ 63 | && install-php-extensions pdo_mysql \ 64 | && install-php-extensions pdo_pgsql \ 65 | && install-php-extensions redis \ 66 | && install-php-extensions soap \ 67 | && install-php-extensions xhprof \ 68 | && install-php-extensions zip 69 | 70 | # Install xdebug but disable it by default 71 | RUN install-php-extensions xdebug \ 72 | && rm -f /usr/local/etc/php/conf.d/*xdebug.ini 73 | 74 | RUN \ 75 | chsh -s /bin/bash www-data && mkdir -p /var/www/.composer && chown -R www-data:www-data /var/www \ 76 | && apt-get -y clean \ 77 | && apt-get -y autoclean \ 78 | && apt-get -y autoremove \ 79 | && rm -rf /var/lib/apt/lists/* && rm -rf && rm -rf /var/lib/cache/* && rm -rf /var/lib/log/* && rm -rf /tmp/* 80 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = () => {}; 4 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | base = "./" 3 | publish = "docs/.vitepress/dist" 4 | command = "npm run docs:mvb" 5 | 6 | [context.deploy-preview] 7 | command = "npm run docs:build" 8 | 9 | # https://github.com/munter/netlify-plugin-checklinks#readme 10 | [[context.deploy-preview.plugins]] 11 | package = "netlify-plugin-checklinks" 12 | [context.deploy-preview.plugins.inputs] 13 | todoPatterns = [ "load", "CHANGELOG.html", "/v/", "x.com", "twitter.com", "www.php.net" ] 14 | skipPatterns = [ ".rss", ".gif", ".jpg" ] 15 | checkExternal = true 16 | 17 | # Sets our asset optimization 18 | [build.processing.css] 19 | bundle = true 20 | minify = true 21 | [build.processing.js] 22 | bundle = true 23 | minify = true 24 | [build.processing.html] 25 | pretty_urls = false 26 | [build.processing.images] 27 | compress = true 28 | 29 | # Caches our images for 1 year 30 | [[headers]] 31 | for = "/images/*" 32 | [headers.values] 33 | Cache-Control = "public, max-age=31536000" 34 | 35 | # pluginz 36 | # https://github.com/netlify/netlify-plugin-lighthouse#readme 37 | [[plugins]] 38 | package = "@netlify/plugin-lighthouse" 39 | [plugins.inputs.audits] 40 | output_path = "reports/lighthouse.html" 41 | 42 | # We need this so preview environments and the base site look ok on their own 43 | [[redirects]] 44 | from = "/" 45 | to = "/plugins/php" 46 | status = 200 47 | [[redirects]] 48 | from = "/plugins/php/*" 49 | to = "/:splat" 50 | status = 200 51 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@lando/php", 3 | "description": "A Lando plugin that provides a tight integration with PHP.", 4 | "version": "1.7.1", 5 | "author": "Mike Pirog @pirog", 6 | "license": "GPL-3.0", 7 | "repository": "lando/php", 8 | "bugs": "https://github.com/lando/php/issues/new/choose", 9 | "homepage": "https://github.com/lando/php", 10 | "keywords": [ 11 | "lando", 12 | "lando-plugin", 13 | "lando-service", 14 | "php" 15 | ], 16 | "engines": { 17 | "node": ">=18.0.0" 18 | }, 19 | "lando": {}, 20 | "main": "index.js", 21 | "nyc": { 22 | "include": [ 23 | "lib/**/*.js", 24 | "recipes/**/*.js", 25 | "services/**/*.js", 26 | "types/**/*.js" 27 | ], 28 | "exclude": [ 29 | "test/**" 30 | ], 31 | "cache": true, 32 | "all": true 33 | }, 34 | "scripts": { 35 | "coverage": "nyc report --reporter=text-lcov | coveralls", 36 | "docs:build": "LANDO_MVB_VERSION=$(git describe --tags --always --abbrev=1 --match=\"v[0-9].*\") vitepress build docs", 37 | "docs:dev": "LANDO_MVB_VERSION=$(git describe --tags --always --abbrev=1 --match=\"v[0-9].*\") vitepress dev docs", 38 | "docs:mvb": "npx mvb docs", 39 | "docs:preview": "vitepress preview docs", 40 | "lint": "eslint . --ext .js --ext .mjs ", 41 | "test:unit": "nyc --reporter=html --reporter=text mocha --timeout 5000 test/**/*.spec.js", 42 | "test:leia": "npm run leia \"examples/**/README.md\" -c 'Destroy tests' --stdin", 43 | "test": "npm run lint && npm run test:unit" 44 | }, 45 | "dependencies": { 46 | "@lando/nginx": "^1.4.4", 47 | "lodash": "^4.17.21", 48 | "semver": "^7.6.3" 49 | }, 50 | "devDependencies": { 51 | "@babel/eslint-parser": "^7.25.9", 52 | "@lando/leia": "0.6.7", 53 | "@lando/vitepress-theme-default-plus": "^1.1.1", 54 | "chai": "^4.3.4", 55 | "command-line-test": "^1.0.10", 56 | "eslint": "^7.32.0", 57 | "eslint-config-google": "^0.9.1", 58 | "eslint-plugin-vue": "^8.0.3", 59 | "mocha": "^11.1.0", 60 | "nyc": "^15.1.0", 61 | "vitepress": "^1.3.4" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /plugin.yml: -------------------------------------------------------------------------------- 1 | # We don't need this because its in the package.json 2 | # but we set it anyway just to make sure we know what is what 3 | name: "@lando/php" 4 | 5 | # Let lando autoscan this plugin for "legacy" plugin stuff needed for v3 6 | legacy: true 7 | 8 | # This is just metadata that something else can use to understand how the docs are organized 9 | docs: 10 | # This is the tag we should use when connecting platform.sh content together eg showing guides on the main 11 | # platform.sh recipe docs 12 | tag: php 13 | 14 | # This gets added to the lando/lando docs guides.json 15 | guides: 16 | title: PHP 17 | collapsable: true 18 | # Note that these are "source/destination" pairs the source is relative to the root of this 19 | # repo and the desintation is relative to docs/guides in the main lando repo 20 | # When this gets added to guides.json we map children so its just the destination 21 | children: 22 | "guides/adding-tooling": php/adding-tooling 23 | 24 | # This gets added to the lando/lando docs config.js 25 | # Below takes docs/usage.md from this repo and puts it into config/CHANGEME.md in lando/lando 26 | # and then adds CHANGEME to the list of recipes in config.js 27 | config: 28 | recipes: 29 | "php": ./docs/usage.md 30 | -------------------------------------------------------------------------------- /scripts/install-composer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | VERSION="$1" 6 | 7 | # NOTE: we should have better protections here 8 | php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" 9 | 10 | # Allow for a few convenience install methods 11 | if [ "$VERSION" = '1-latest' ]; then 12 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --1 13 | elif [ "$VERSION" = '1' ]; then 14 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --1 15 | elif [ "$VERSION" = '2-latest' ]; then 16 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --2 17 | elif [ "$VERSION" = '2' ]; then 18 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --2 19 | elif [ "$VERSION" = '2.2' ]; then 20 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --2.2 21 | elif [ "$VERSION" = '2.2-latest' ]; then 22 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --2.2 23 | elif [ "$VERSION" = 'preview' ]; then 24 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --preview 25 | elif [ "$VERSION" = 'snapshot' ]; then 26 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --snapshot 27 | else 28 | php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer --version="$VERSION" 29 | fi 30 | 31 | # Remove the setup script 32 | php -r "unlink('/tmp/composer-setup.php');" 33 | 34 | # Check if anything is installed globally 35 | if [ -f /var/www/.composer/composer.json ]; then 36 | # If this is version 2 then let's make sure hirak/prestissimo is removed 37 | if composer --version 2>/dev/null | grep -E "Composer (version )?2." > /dev/null; then 38 | composer global remove hirak/prestissimo 39 | fi 40 | fi 41 | -------------------------------------------------------------------------------- /test/auth.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const chai = require('chai'); 4 | chai.should(); 5 | 6 | describe('auth', () => { 7 | it('should have tests'); 8 | }); 9 | -------------------------------------------------------------------------------- /utils/add-build-step.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Modules 4 | const _ = require('lodash'); 5 | 6 | /** 7 | * Helper function to add build steps to a service's configuration 8 | * 9 | * @param {string|string[]} steps - The build step(s) to add 10 | * @param {Object} app - The Lando app object 11 | * @param {string} name - The name of the service 12 | * @param {string} [step='build_internal'] - The build step type to modify 13 | * @param {boolean} [front=false] - Whether to add steps to front of array 14 | * @return {void} - Modifies app config object directly 15 | * 16 | * @example 17 | * // Add a build step to the end 18 | * addBuildStep('npm install', app, 'web'); 19 | * 20 | * @example 21 | * // Add multiple build steps to the front 22 | * addBuildStep(['composer install', 'npm install'], app, 'web', 'build_internal', true); 23 | */ 24 | module.exports = (steps, app, name, step = 'build_internal', front = false) => { 25 | const current = _.get(app, `config.services.${name}.${step}`, []); 26 | const add = (front) ? _.flatten([steps, current]) : _.flatten([current, steps]); 27 | _.set(app, `config.services.${name}.${step}`, _.uniq(add)); 28 | }; 29 | -------------------------------------------------------------------------------- /utils/clone-overrides.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Modules 4 | const _ = require('lodash'); 5 | 6 | /* 7 | * Helper to get global deps 8 | * @TODO: this looks pretty testable? should services have libs? 9 | */ 10 | module.exports = (overrides = {}) => { 11 | const newOverrides = _.cloneDeep(overrides); 12 | if (_.has(newOverrides, 'image')) delete newOverrides.image; 13 | if (_.has(newOverrides, 'build')) delete newOverrides.build; 14 | return newOverrides; 15 | }; 16 | -------------------------------------------------------------------------------- /utils/get-install-commands.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Modules 4 | const _ = require('lodash'); 5 | 6 | /** 7 | * Helper function to generate installation commands for dependencies 8 | * 9 | * @param {Object} deps - Dependencies object with package names as keys and versions as values 10 | * @param {Function} pkger - Function that generates package installation command 11 | * @param {string[]} [prefix=[]] - Command prefix to prepend to each installation command 12 | * @return {string[]} Array of formatted installation commands 13 | * 14 | * @example 15 | * // Generate npm install commands 16 | * const deps = { 'lodash': '^4.0.0', 'express': '4.17.1' }; 17 | * const npmInstall = (pkg, version) => ['npm', 'install', `${pkg}@${version}`]; 18 | * getInstallCommands(deps, npmInstall); 19 | * // Returns: ['npm install lodash@^4.0.0', 'npm install express@4.17.1'] 20 | * 21 | * @example 22 | * // Generate commands with prefix 23 | * getInstallCommands(deps, npmInstall, ['sudo', '-E']); 24 | * // Returns: ['sudo -E npm install lodash@^4.0.0', 'sudo -E npm install express@4.17.1'] 25 | */ 26 | module.exports = (deps, pkger, prefix = []) => _(deps) 27 | .map((version, pkg) => _.flatten([prefix, pkger(pkg, version)])) 28 | .map(command => command.join(' ')) 29 | .value(); 30 | --------------------------------------------------------------------------------