Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renoki-co/laravel-docker-base
Already-compiled PHP-based Images to use when deploying your Laravel application to Kubernetes using Laravel Helm charts.
https://github.com/renoki-co/laravel-docker-base
docker docker-image laravel laravel-docker-images octane php-docker php-fpm workers
Last synced: about 1 month ago
JSON representation
Already-compiled PHP-based Images to use when deploying your Laravel application to Kubernetes using Laravel Helm charts.
- Host: GitHub
- URL: https://github.com/renoki-co/laravel-docker-base
- Owner: renoki-co
- License: apache-2.0
- Created: 2021-04-13T09:57:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-06T11:01:13.000Z (almost 2 years ago)
- Last Synced: 2023-04-10T21:07:52.307Z (over 1 year ago)
- Topics: docker, docker-image, laravel, laravel-docker-images, octane, php-docker, php-fpm, workers
- Homepage:
- Size: 176 KB
- Stars: 28
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Laravel Docker Images
=====================- [Laravel Docker Images](#laravel-docker-images)
- [🤝 Supporting](#-supporting)
- [🚀 Getting Started](#-getting-started)
- [⛽ Octane](#-octane)
- [🖥 PHP-FPM](#-php-fpm)
- [🤖 Workers](#-workers)Already-compiled PHP-based Images to use when deploying your Laravel application to Kubernetes using Laravel Helm charts.
## 🤝 Supporting
**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). 📦**
[](https://github-content.renoki.org/github-repo/32)
## 🚀 Getting Started
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.
For Docker & versioning examples, please check [`renokico/laravel-base` Quay page](https://quay.io/repository/renokico/laravel-base).
This project compiles images:
- for PHP-FPM + NGINX projects, using `Dockerfile.fpm`, based on an official PHP-FPM Docker image
- for Octane, using `Dockerfile.octane`, based on [a PHP, Swoole-ready image](https://hub.docker.com/r/phpswoole/swoole)
- for Workers, like CLI commands, using `Dockerfile.worker`, based on an official PHP CLI Docker imageThese images can be used to compile your app code in a PHP-ready container to be used in Kubernetes.
## ⛽ Octane
Octane images are based on [a PHP-Swoole image](https://hub.docker.com/r/phpswoole/swoole) that works directly with Octane in Swoole mode.
```Dockerfile
FROM quay.io/renokico/laravel-base:octane-latest-php8.1-alpineCOPY . /var/www/html
RUN mkdir -p /var/www/html/storage/logs/ && \
chown -R www-data:www-data /var/www/htmlWORKDIR /var/www/html
ENTRYPOINT ["php", "-d", "variables_order=EGPCS", "artisan", "octane:start", "--server=swoole", "--host=0.0.0.0", "--port=80"]
EXPOSE 80
```## 🖥 PHP-FPM
The PHP-FPM image contains the PHP-FPM process and will be complemented by NGINX in the Helm chart.
```Dockerfile
FROM quay.io/renokico/laravel-base:latest-8.1-fpm-alpineCOPY . /var/www/html
RUN mkdir -p /var/www/html/storage/logs/ && \
chown -R www-data:www-data /var/www/htmlWORKDIR /var/www/html
```## 🤖 Workers
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.
```Dockerfile
FROM quay.io/renokico/laravel-base:worker-latest-8.1-cli-alpineCOPY . /var/www/html
RUN mkdir -p /var/www/html/storage/logs/ && \
chown -R www-data:www-data /var/www/htmlWORKDIR /var/www/html
ENTRYPOINT ["php", "-a"]
```