This repo is a docker boilerplate to use for Laravel projects. Containers included in this docker:
- Laravel 11 & 12
- FrankenPHP
- MySQL
- Redis
- Supervisor
- Octane
- Minio for S3
- MailPit
The purpose of this repo is to run Laravel 11 & Laravel 12 in a Docker container using Octane and FrankenPHP.
Use the package manager git to install Docker boilerplate.
# setup project locally
$ git clone https://github.com/jaygaha/laravel-11-frankenphp-docker.git
# Navigate to project directory:
$ cd laravel-11-frankenphp-dockerCopy the .env.example file to .env:
# Linux
$ cp .env.example .env
# OR
# Windows
$ copy .env.example .envEdit the .env file to configure your application settings. At a minimum, you should set the following variables:
APP_NAME: The name of your application.APP_ENV: The environment your application is running in (e.g., local, production).APP_KEY: The application key (will be generated in the next step).APP_DEBUG: Set totruefor debugging.APP_URL: The URL of your application.DB_CONNECTION: The database connection (e.g., mysql).DB_HOST: The database host.DB_PORT: The database port.DB_DATABASE: The database name.DB_USERNAME: The database username.DB_PASSWORD: The database password.
Edit docker related setting according to your preferences.
Run composer to install the required packages:
# install required packages
$ composer installGenerate a new application key:
# app key setup
$ php artisan key:generateBuild the Docker images:
# build docker images
$ docker compose buildRun the containers:
# Run containers
$ docker compose up -dTo stop the containers, run:
# Stop containers
$ docker compose downTo view the logs of a specific container, run:
# View logs
$ docker compose logs <container_name>If you are using podman replace docker with podman
To access the application, open your browser and navigate to the URL specified in the APP_URL variable in your .env file.
Upgrading To 12.0 From 11.x
$ composer updatePull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FREE TO USE