Skip to content

slowlyo/laradock-multi-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laradock Multi Version

中文说明

Enable Laradock to run multiple PHP versions simultaneously

Features

  • Support running multiple PHP versions simultaneously
  • No impact on Laradock updates (only modified one original Laradock file)

Quick Start

1. Installation

Clone this project to your Laradock root directory:

git clone git@github.com:slowlyo/laradock-multi-version.git {your Laradock directory}/.laradock-multi-version

2. Configuration

Add the following configuration to your Laradock's docker-compose.yml file:

# Note: Must be placed at the first line of Laradock docker-compose.yml file
include:
  - .laradock-multi-version/docker-compose.yml

3. Start Services

Use docker compose command to start the required services:

# Example: Start PHP 7.4, PHP 8.0
# Execute in Laradock directory
docker compose up -d php-fpm-74 workspace-74 php-fpm-80 workspace-80 ...

4. Use

location ~ \.php$ {
    # ...
-   fastcgi_pass php-fpm:9000;
+   fastcgi_pass php-fpm-80:9000;
    # ...
}

About

Enable Laradock to run multiple PHP versions simultaneously

Topics

Resources

License

Stars

Watchers

Forks

Contributors