Laravel Octane Dockerfile
A pretty configurable and production ready multi-stage Dockerfile for Octane powered Laravelish web services and microservices.
The Docker configuration provides the following setup:
- Debian Buster 10
- PHP 8.0
- Swoole Server
And the following PHP extensions are included:
- MySQL Client
Exposed ports of container:
Clone this repository:
git clone [email protected]:exaco/laravel-octane-dockerfile.git
Copy cloned directory content into your Octane powered Laravel project
Change directory to your Laravel project
Build your image:
docker build -t <container-name>:<tag> .
Up the container:
docker run -p <port>:9000 --rm <container-name>:<tag>
There are something that you maybe want to configure:
- Application request workers count in
- Max request count for request workers in
- The amount of workers available to process concurrent tasks in
- OPcache and JIT configurations in
- PHP configurations in
ENTRYPOINTBash script in
- Set OS timezone using the
--build-argoption along with the build command
Thank you for considering contributing! If you find an issue, or have a better way to do something, feel free to open an issue, or a PR.
This repository is open-sourced software licensed under the MIT license.