Skip to content

Already-compiled PHP-based Images to use when deploying your Laravel application to Kubernetes using Laravel Helm charts.

License

Notifications You must be signed in to change notification settings

renoki-co/laravel-docker-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Docker Images

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. 📦

🚀 Getting Started

Images are used to deploy a sample Laravel application 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.

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
  • for Workers, like CLI commands, using Dockerfile.worker, based on an official PHP CLI Docker image

These 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 that works directly with Octane in Swoole mode.

FROM quay.io/renokico/laravel-base:octane-latest-php8.1-alpine

COPY . /var/www/html

RUN mkdir -p /var/www/html/storage/logs/ && \
    chown -R www-data:www-data /var/www/html

WORKDIR /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.

FROM quay.io/renokico/laravel-base:latest-8.1-fpm-alpine

COPY . /var/www/html

RUN mkdir -p /var/www/html/storage/logs/ && \
    chown -R www-data:www-data /var/www/html

WORKDIR /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.

FROM quay.io/renokico/laravel-base:worker-latest-8.1-cli-alpine

COPY . /var/www/html

RUN mkdir -p /var/www/html/storage/logs/ && \
    chown -R www-data:www-data /var/www/html

WORKDIR /var/www/html

ENTRYPOINT ["php", "-a"]

About

Already-compiled PHP-based Images to use when deploying your Laravel application to Kubernetes using Laravel Helm charts.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published