├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── docker-commit.yml │ ├── docker-latest-tag.yaml │ └── docker-release-tag.yaml ├── CONTRIBUTING.md ├── Dockerfile.fpm ├── Dockerfile.octane ├── Dockerfile.worker ├── LICENSE └── README.md /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: rennokki 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | - package-ecosystem: docker 8 | directory: "/" 9 | schedule: 10 | interval: weekly 11 | open-pull-requests-limit: 10 12 | -------------------------------------------------------------------------------- /.github/workflows/docker-commit.yml: -------------------------------------------------------------------------------- 1 | name: Docker Commit 2 | 3 | on: 4 | push: 5 | branches: 6 | - "*" 7 | pull_request: 8 | branches: 9 | - "*" 10 | 11 | jobs: 12 | fpm_push: 13 | if: "!contains(github.event.head_commit.message, 'skip ci')" 14 | 15 | runs-on: ubuntu-latest 16 | 17 | name: Tag Commit (PHP-FPM, ${{ matrix.base-tag }}) 18 | 19 | strategy: 20 | fail-fast: false 21 | matrix: 22 | base-tag: 23 | - 7.4-fpm-alpine 24 | - 8.0-fpm-alpine 25 | - 8.1-fpm-alpine 26 | 27 | steps: 28 | - uses: actions/checkout@v3 29 | 30 | - name: Set up QEMU 31 | uses: docker/setup-qemu-action@v2 32 | 33 | - name: Set up Docker Buildx 34 | uses: docker/setup-buildx-action@v2 35 | 36 | - name: Login to Quay 37 | uses: docker/login-action@v2 38 | with: 39 | registry: quay.io 40 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 41 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 42 | 43 | - name: Build and push 44 | id: docker 45 | uses: docker/build-push-action@v3 46 | with: 47 | push: true 48 | context: . 49 | tags: quay.io/renokico/laravel-base:${{ github.sha }}-${{ matrix.base-tag }} 50 | file: Dockerfile.fpm 51 | build-args: | 52 | BASE_TAG=${{ matrix.base-tag }} 53 | 54 | octane_push: 55 | if: "!contains(github.event.head_commit.message, 'skip ci')" 56 | 57 | runs-on: ubuntu-latest 58 | 59 | name: Tag Commit (Octane, ${{ matrix.base-tag }}) 60 | 61 | strategy: 62 | fail-fast: false 63 | matrix: 64 | base-tag: 65 | - 4.8-php8.0-alpine 66 | - 4.7-php8.0-alpine 67 | - 4.6-php8.0-alpine 68 | - 4.8-php8.1-alpine 69 | # - 4.7-php8.1-alpine 70 | # - 4.6-php8.1-alpine 71 | 72 | steps: 73 | - uses: actions/checkout@v3 74 | 75 | - name: Set up QEMU 76 | uses: docker/setup-qemu-action@v2 77 | 78 | - name: Set up Docker Buildx 79 | uses: docker/setup-buildx-action@v2 80 | 81 | - name: Login to Quay 82 | uses: docker/login-action@v2 83 | with: 84 | registry: quay.io 85 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 86 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 87 | 88 | - name: Build and push 89 | id: docker 90 | uses: docker/build-push-action@v3 91 | with: 92 | push: true 93 | context: . 94 | tags: quay.io/renokico/laravel-base:octane-${{ github.sha }}-${{ matrix.base-tag }} 95 | file: Dockerfile.octane 96 | build-args: | 97 | BASE_TAG=${{ matrix.base-tag }} 98 | 99 | worker_push: 100 | if: "!contains(github.event.head_commit.message, 'skip ci')" 101 | 102 | runs-on: ubuntu-latest 103 | 104 | name: Tag Commit (Worker, ${{ matrix.base-tag }}) 105 | 106 | strategy: 107 | fail-fast: false 108 | matrix: 109 | base-tag: 110 | - 8.1-cli-alpine 111 | - 8.0-cli-alpine 112 | - 7.4-cli-alpine 113 | 114 | steps: 115 | - uses: actions/checkout@v3 116 | 117 | - name: Set up QEMU 118 | uses: docker/setup-qemu-action@v2 119 | 120 | - name: Set up Docker Buildx 121 | uses: docker/setup-buildx-action@v2 122 | 123 | - name: Login to Quay 124 | uses: docker/login-action@v2 125 | with: 126 | registry: quay.io 127 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 128 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 129 | 130 | - name: Build and push 131 | id: docker 132 | uses: docker/build-push-action@v3 133 | with: 134 | push: true 135 | context: . 136 | tags: quay.io/renokico/laravel-base:worker-${{ github.sha }}-${{ matrix.base-tag }} 137 | file: Dockerfile.worker 138 | build-args: | 139 | BASE_TAG=${{ matrix.base-tag }} 140 | -------------------------------------------------------------------------------- /.github/workflows/docker-latest-tag.yaml: -------------------------------------------------------------------------------- 1 | name: Docker Latest 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | push_fpm: 10 | if: "!contains(github.event.head_commit.message, 'skip ci')" 11 | 12 | runs-on: ubuntu-latest 13 | 14 | name: Tag Latest (PHP-FPM, ${{ matrix.base-tag }}) 15 | 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | base-tag: 20 | - 7.4-fpm-alpine 21 | - 8.0-fpm-alpine 22 | - 8.1-fpm-alpine 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | 27 | - name: Set up QEMU 28 | uses: docker/setup-qemu-action@v2 29 | 30 | - name: Set up Docker Buildx 31 | uses: docker/setup-buildx-action@v2 32 | 33 | - name: Login to Quay 34 | uses: docker/login-action@v2 35 | with: 36 | registry: quay.io 37 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 38 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 39 | 40 | - name: Build and push 41 | id: docker 42 | uses: docker/build-push-action@v3 43 | with: 44 | push: true 45 | context: . 46 | tags: quay.io/renokico/laravel-base:latest-${{ matrix.base-tag }} 47 | file: Dockerfile.fpm 48 | build-args: | 49 | BASE_TAG=${{ matrix.base-tag }} 50 | 51 | push_octane: 52 | if: "!contains(github.event.head_commit.message, 'skip ci')" 53 | 54 | runs-on: ubuntu-latest 55 | 56 | name: Tag Latest (Octane, ${{ matrix.base-tag }}) 57 | 58 | strategy: 59 | fail-fast: false 60 | matrix: 61 | base-tag: 62 | - 4.8-php8.0-alpine 63 | - 4.7-php8.0-alpine 64 | - 4.6-php8.0-alpine 65 | - 4.8-php8.1-alpine 66 | # - 4.7-php8.1-alpine 67 | # - 4.6-php8.1-alpine 68 | 69 | steps: 70 | - uses: actions/checkout@v3 71 | 72 | - name: Set up QEMU 73 | uses: docker/setup-qemu-action@v2 74 | 75 | - name: Set up Docker Buildx 76 | uses: docker/setup-buildx-action@v2 77 | 78 | - name: Login to Quay 79 | uses: docker/login-action@v2 80 | with: 81 | registry: quay.io 82 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 83 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 84 | 85 | - name: Build and push 86 | id: docker 87 | uses: docker/build-push-action@v3 88 | with: 89 | push: true 90 | context: . 91 | tags: quay.io/renokico/laravel-base:octane-latest-${{ matrix.base-tag }} 92 | file: Dockerfile.octane 93 | build-args: | 94 | BASE_TAG=${{ matrix.base-tag }} 95 | 96 | push_worker: 97 | if: "!contains(github.event.head_commit.message, 'skip ci')" 98 | 99 | runs-on: ubuntu-latest 100 | 101 | name: Tag Latest (Worker, ${{ matrix.base-tag }}) 102 | 103 | strategy: 104 | fail-fast: false 105 | matrix: 106 | base-tag: 107 | - 8.1-cli-alpine 108 | - 8.0-cli-alpine 109 | - 7.4-cli-alpine 110 | 111 | steps: 112 | - uses: actions/checkout@v3 113 | 114 | - name: Set up QEMU 115 | uses: docker/setup-qemu-action@v2 116 | 117 | - name: Set up Docker Buildx 118 | uses: docker/setup-buildx-action@v2 119 | 120 | - name: Login to Quay 121 | uses: docker/login-action@v2 122 | with: 123 | registry: quay.io 124 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 125 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 126 | 127 | - name: Build and push 128 | id: docker 129 | uses: docker/build-push-action@v3 130 | with: 131 | push: true 132 | context: . 133 | tags: quay.io/renokico/laravel-base:worker-latest-${{ matrix.base-tag }} 134 | file: Dockerfile.worker 135 | build-args: | 136 | BASE_TAG=${{ matrix.base-tag }} 137 | -------------------------------------------------------------------------------- /.github/workflows/docker-release-tag.yaml: -------------------------------------------------------------------------------- 1 | name: Docker Release 2 | 3 | on: 4 | push: 5 | tags: 6 | - "*" 7 | 8 | jobs: 9 | push_fpm: 10 | if: "!contains(github.event.head_commit.message, 'skip ci')" 11 | 12 | runs-on: ubuntu-latest 13 | 14 | name: Tag Release (PHP-FPM, ${{ matrix.base-tag }}) 15 | 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | base-tag: 20 | - 7.4-fpm-alpine 21 | - 8.0-fpm-alpine 22 | - 8.1-fpm-alpine 23 | 24 | steps: 25 | - uses: actions/checkout@v3 26 | 27 | - name: Docker meta 28 | id: docker_meta 29 | uses: docker/metadata-action@v4.0.1 30 | with: 31 | images: quay.io/renokico/laravel-base 32 | tags: | 33 | type=semver,pattern={{version}}-${{ matrix.base-tag }} 34 | type=semver,pattern={{major}}.{{minor}}-${{ matrix.base-tag }} 35 | 36 | - name: Set up QEMU 37 | uses: docker/setup-qemu-action@v2 38 | 39 | - name: Set up Docker Buildx 40 | uses: docker/setup-buildx-action@v2 41 | 42 | - name: Login to Quay 43 | uses: docker/login-action@v2 44 | with: 45 | registry: quay.io 46 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 47 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 48 | 49 | - name: Build and Push 50 | id: docker 51 | uses: docker/build-push-action@v3 52 | with: 53 | push: true 54 | context: . 55 | tags: ${{ steps.docker_meta.outputs.tags }} 56 | labels: ${{ steps.docker_meta.outputs.labels }} 57 | file: Dockerfile.fpm 58 | build-args: | 59 | BASE_TAG=${{ matrix.base-tag }} 60 | 61 | push_octane: 62 | if: "!contains(github.event.head_commit.message, 'skip ci')" 63 | 64 | runs-on: ubuntu-latest 65 | 66 | name: Tag Release (Octane, ${{ matrix.base-tag }}) 67 | 68 | strategy: 69 | matrix: 70 | base-tag: 71 | - 4.8-php8.0-alpine 72 | - 4.7-php8.0-alpine 73 | - 4.6-php8.0-alpine 74 | - 4.8-php8.1-alpine 75 | # - 4.7-php8.1-alpine 76 | # - 4.6-php8.1-alpine 77 | 78 | steps: 79 | - uses: actions/checkout@v3 80 | 81 | - name: Docker meta 82 | id: docker_meta 83 | uses: docker/metadata-action@v4.0.1 84 | with: 85 | images: quay.io/renokico/laravel-base 86 | tags: | 87 | type=semver,pattern=octane-{{version}}-${{ matrix.base-tag }} 88 | type=semver,pattern=octane-{{major}}.{{minor}}-${{ matrix.base-tag }} 89 | 90 | - name: Set up QEMU 91 | uses: docker/setup-qemu-action@v2 92 | 93 | - name: Set up Docker Buildx 94 | uses: docker/setup-buildx-action@v2 95 | 96 | - name: Login to Quay 97 | uses: docker/login-action@v2 98 | with: 99 | registry: quay.io 100 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 101 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 102 | 103 | - name: Build and Push 104 | id: docker 105 | uses: docker/build-push-action@v3 106 | with: 107 | push: true 108 | context: . 109 | tags: ${{ steps.docker_meta.outputs.tags }} 110 | labels: ${{ steps.docker_meta.outputs.labels }} 111 | file: Dockerfile.octane 112 | build-args: | 113 | BASE_TAG=${{ matrix.base-tag }} 114 | 115 | push_worker: 116 | if: "!contains(github.event.head_commit.message, 'skip ci')" 117 | 118 | runs-on: ubuntu-latest 119 | 120 | name: Tag Release (Worker, ${{ matrix.base-tag }}) 121 | 122 | strategy: 123 | matrix: 124 | base-tag: 125 | - 8.1-cli-alpine 126 | - 8.0-cli-alpine 127 | - 7.4-cli-alpine 128 | 129 | steps: 130 | - uses: actions/checkout@v3 131 | 132 | - name: Docker meta 133 | id: docker_meta 134 | uses: docker/metadata-action@v4.0.1 135 | with: 136 | images: quay.io/renokico/laravel-base 137 | tags: | 138 | type=semver,pattern=worker-{{version}}-${{ matrix.base-tag }} 139 | type=semver,pattern=worker-{{major}}.{{minor}}-${{ matrix.base-tag }} 140 | 141 | - name: Set up QEMU 142 | uses: docker/setup-qemu-action@v2 143 | 144 | - name: Set up Docker Buildx 145 | uses: docker/setup-buildx-action@v2 146 | 147 | - name: Login to Quay 148 | uses: docker/login-action@v2 149 | with: 150 | registry: quay.io 151 | username: ${{ secrets.DOCKER_REPOSITORY_USERNAME }} 152 | password: ${{ secrets.DOCKER_REPOSITORY_TOKEN }} 153 | 154 | - name: Build and Push 155 | id: docker 156 | uses: docker/build-push-action@v3 157 | with: 158 | push: true 159 | context: . 160 | tags: ${{ steps.docker_meta.outputs.tags }} 161 | labels: ${{ steps.docker_meta.outputs.labels }} 162 | file: Dockerfile.worker 163 | build-args: | 164 | BASE_TAG=${{ matrix.base-tag }} 165 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | Please read and understand the contribution guide before creating an issue or pull request. 6 | 7 | ## Etiquette 8 | 9 | This project is open source, and as such, the maintainers give their free time to build and maintain the source code 10 | held within. They make the code freely available in the hope that it will be of use to other developers. It would be 11 | extremely unfair for them to suffer abuse or anger for their hard work. 12 | 13 | Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the 14 | world that developers are civilized and selfless people. 15 | 16 | It's the duty of the maintainer to ensure that all submissions to the project are of sufficient 17 | quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used. 18 | 19 | ## Viability 20 | 21 | When requesting or submitting new features, first consider whether it might be useful to others. Open 22 | source projects are used by many developers, who may have entirely different needs to your own. Think about 23 | whether or not your feature is likely to be used by other users of the project. 24 | 25 | ## Procedure 26 | 27 | Before filing an issue: 28 | 29 | - Attempt to replicate the problem, to ensure that it wasn't a coincidental incident. 30 | - Check to make sure your feature suggestion isn't already present within the project. 31 | - Check the pull requests tab to ensure that the bug doesn't have a fix in progress. 32 | - Check the pull requests tab to ensure that the feature isn't already in progress. 33 | 34 | Before submitting a pull request: 35 | 36 | - Check the codebase to ensure that your feature doesn't already exist. 37 | - Check the pull requests to ensure that another person hasn't already submitted the feature or fix. 38 | 39 | ## Requirements 40 | 41 | If the project maintainer has any additional requirements, you will find them listed here. 42 | 43 | - **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer). 44 | 45 | - **Add tests!** - Your patch won't be accepted if it doesn't have tests. 46 | 47 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 48 | 49 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. 50 | 51 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 52 | 53 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 54 | 55 | **Happy coding**! 56 | -------------------------------------------------------------------------------- /Dockerfile.fpm: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG=8.1-fpm-alpine 2 | 3 | FROM php:$BASE_TAG 4 | 5 | RUN apk --update add \ 6 | wget \ 7 | curl \ 8 | build-base \ 9 | composer \ 10 | nodejs \ 11 | npm \ 12 | libmcrypt-dev \ 13 | libxml2-dev \ 14 | pcre-dev \ 15 | zlib-dev \ 16 | autoconf \ 17 | oniguruma-dev \ 18 | openssl \ 19 | openssl-dev \ 20 | freetype-dev \ 21 | libjpeg-turbo-dev \ 22 | jpeg-dev \ 23 | libpng-dev \ 24 | imagemagick-dev \ 25 | imagemagick \ 26 | postgresql-dev \ 27 | libzip-dev \ 28 | gettext-dev \ 29 | libxslt-dev \ 30 | libgcrypt-dev && \ 31 | pecl channel-update pecl.php.net && \ 32 | pecl install mcrypt redis-5.3.4 && \ 33 | docker-php-ext-install \ 34 | mysqli \ 35 | mbstring \ 36 | pdo \ 37 | pdo_mysql \ 38 | xml \ 39 | pcntl \ 40 | bcmath \ 41 | pdo_pgsql \ 42 | zip \ 43 | intl \ 44 | gettext \ 45 | soap \ 46 | sockets \ 47 | xsl && \ 48 | docker-php-ext-configure gd --with-freetype=/usr/lib/ --with-jpeg=/usr/lib/ && \ 49 | docker-php-ext-install gd && \ 50 | docker-php-ext-enable redis && \ 51 | rm -rf /tmp/pear && \ 52 | rm /var/cache/apk/* 53 | 54 | WORKDIR /var/www/html 55 | -------------------------------------------------------------------------------- /Dockerfile.octane: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG=4.6-php8.1-alpine 2 | 3 | # https://hub.docker.com/r/phpswoole/swoole 4 | FROM phpswoole/swoole:$BASE_TAG 5 | 6 | RUN apk --update add \ 7 | wget \ 8 | curl \ 9 | build-base \ 10 | composer \ 11 | nodejs \ 12 | npm \ 13 | libmcrypt-dev \ 14 | libxml2-dev \ 15 | pcre-dev \ 16 | zlib-dev \ 17 | autoconf \ 18 | oniguruma-dev \ 19 | openssl \ 20 | openssl-dev \ 21 | freetype-dev \ 22 | libjpeg-turbo-dev \ 23 | jpeg-dev \ 24 | libpng-dev \ 25 | imagemagick-dev \ 26 | imagemagick \ 27 | postgresql-dev \ 28 | libzip-dev \ 29 | gettext-dev \ 30 | libxslt-dev \ 31 | libgcrypt-dev && \ 32 | pecl channel-update pecl.php.net && \ 33 | pecl install mcrypt redis-5.3.4 && \ 34 | docker-php-ext-install \ 35 | mysqli \ 36 | mbstring \ 37 | pdo \ 38 | pdo_mysql \ 39 | xml \ 40 | pcntl \ 41 | bcmath \ 42 | pdo_pgsql \ 43 | zip \ 44 | intl \ 45 | gettext \ 46 | soap \ 47 | sockets \ 48 | xsl && \ 49 | docker-php-ext-configure gd --with-freetype=/usr/lib/ --with-jpeg=/usr/lib/ && \ 50 | docker-php-ext-install gd && \ 51 | docker-php-ext-enable redis && \ 52 | rm -rf /tmp/pear && \ 53 | rm /var/cache/apk/* 54 | 55 | WORKDIR /var/www/html 56 | 57 | ENTRYPOINT ["php", "-d", "variables_order=EGPCS", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=80"] 58 | 59 | EXPOSE 80 60 | -------------------------------------------------------------------------------- /Dockerfile.worker: -------------------------------------------------------------------------------- 1 | ARG BASE_TAG=8.1-cli-alpine 2 | 3 | FROM php:$BASE_TAG 4 | 5 | RUN apk --update add \ 6 | wget \ 7 | curl \ 8 | build-base \ 9 | composer \ 10 | nodejs \ 11 | npm \ 12 | libmcrypt-dev \ 13 | libxml2-dev \ 14 | pcre-dev \ 15 | zlib-dev \ 16 | autoconf \ 17 | oniguruma-dev \ 18 | openssl \ 19 | openssl-dev \ 20 | freetype-dev \ 21 | libjpeg-turbo-dev \ 22 | jpeg-dev \ 23 | libpng-dev \ 24 | imagemagick-dev \ 25 | imagemagick \ 26 | postgresql-dev \ 27 | libzip-dev \ 28 | gettext-dev \ 29 | libxslt-dev \ 30 | libgcrypt-dev && \ 31 | pecl channel-update pecl.php.net && \ 32 | pecl install mcrypt redis-5.3.4 && \ 33 | docker-php-ext-install \ 34 | mysqli \ 35 | mbstring \ 36 | pdo \ 37 | pdo_mysql \ 38 | xml \ 39 | pcntl \ 40 | bcmath \ 41 | pdo_pgsql \ 42 | zip \ 43 | intl \ 44 | gettext \ 45 | soap \ 46 | sockets \ 47 | xsl && \ 48 | docker-php-ext-configure gd --with-freetype=/usr/lib/ --with-jpeg=/usr/lib/ && \ 49 | docker-php-ext-install gd && \ 50 | docker-php-ext-enable redis && \ 51 | rm -rf /tmp/pear && \ 52 | rm /var/cache/apk/* 53 | 54 | WORKDIR /var/www/html 55 | 56 | ENTRYPOINT ["php", "-a"] 57 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright Renoki Co. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Laravel Docker Images 2 | ===================== 3 | 4 | - [Laravel Docker Images](#laravel-docker-images) 5 | - [🤝 Supporting](#-supporting) 6 | - [🚀 Getting Started](#-getting-started) 7 | - [⛽ Octane](#-octane) 8 | - [🖥 PHP-FPM](#-php-fpm) 9 | - [🤖 Workers](#-workers) 10 | 11 | Already-compiled PHP-based Images to use when deploying your Laravel application to Kubernetes using Laravel Helm charts. 12 | 13 | ## 🤝 Supporting 14 | 15 | **If you are using one or more Renoki Co. open-source packages in your production apps, in presentation demos, hobby projects, school projects or so, sponsor our work with [Github Sponsors](https://github.com/sponsors/rennokki). 📦** 16 | 17 | [](https://github-content.renoki.org/github-repo/32) 18 | 19 | 20 | ## 🚀 Getting Started 21 | 22 | Images are used to deploy a [sample Laravel application](https://github.com/renoki-co/laravel-helm-demo) to Kubernetes using Helm charts for vanilla Laravel, Laravel Octane or to deploy workers such as queues. 23 | 24 | For Docker & versioning examples, please check [`renokico/laravel-base` Quay page](https://quay.io/repository/renokico/laravel-base). 25 | 26 | This project compiles images: 27 | 28 | - for PHP-FPM + NGINX projects, using `Dockerfile.fpm`, based on an official PHP-FPM Docker image 29 | - for Octane, using `Dockerfile.octane`, based on [a PHP, Swoole-ready image](https://hub.docker.com/r/phpswoole/swoole) 30 | - for Workers, like CLI commands, using `Dockerfile.worker`, based on an official PHP CLI Docker image 31 | 32 | These images can be used to compile your app code in a PHP-ready container to be used in Kubernetes. 33 | 34 | ## ⛽ Octane 35 | 36 | Octane images are based on [a PHP-Swoole image](https://hub.docker.com/r/phpswoole/swoole) that works directly with Octane in Swoole mode. 37 | 38 | ```Dockerfile 39 | FROM quay.io/renokico/laravel-base:octane-latest-php8.1-alpine 40 | 41 | COPY . /var/www/html 42 | 43 | RUN mkdir -p /var/www/html/storage/logs/ && \ 44 | chown -R www-data:www-data /var/www/html 45 | 46 | WORKDIR /var/www/html 47 | 48 | ENTRYPOINT ["php", "-d", "variables_order=EGPCS", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=80"] 49 | 50 | EXPOSE 80 51 | ``` 52 | 53 | ## 🖥 PHP-FPM 54 | 55 | The PHP-FPM image contains the PHP-FPM process and will be complemented by NGINX in the Helm chart. 56 | 57 | ```Dockerfile 58 | FROM quay.io/renokico/laravel-base:latest-8.1-fpm-alpine 59 | 60 | COPY . /var/www/html 61 | 62 | RUN mkdir -p /var/www/html/storage/logs/ && \ 63 | chown -R www-data:www-data /var/www/html 64 | 65 | WORKDIR /var/www/html 66 | ``` 67 | 68 | ## 🤖 Workers 69 | 70 | Workers can be either long-running processes that serve as workers (for example, queues) or by running a local process that might also expose a HTTP server, etc. Either way, you can use a Worker to extend your project. 71 | 72 | ```Dockerfile 73 | FROM quay.io/renokico/laravel-base:worker-latest-8.1-cli-alpine 74 | 75 | COPY . /var/www/html 76 | 77 | RUN mkdir -p /var/www/html/storage/logs/ && \ 78 | chown -R www-data:www-data /var/www/html 79 | 80 | WORKDIR /var/www/html 81 | 82 | ENTRYPOINT ["php", "-a"] 83 | ``` 84 | --------------------------------------------------------------------------------