Skip to content

🐳 Docker-based LEMP stack for development purposes

Notifications You must be signed in to change notification settings

panakour/phpdock

Repository files navigation

PHPDock

PHPDock is a Docker-based development environment for PHP applications. It simplifies the setup and management of PHP development environments by using Docker containers.

Features

  • Supports multiple PHP versions at the same time.
  • Easily add the PHP extensions you want.
  • Xdebug.
  • A lot of extra services in the Docker Compose.

Requirements

  • Docker
  • Docker Compose

Installation

  1. Clone the repository:

    git clone https://github.com/panakour/phpdock.git
    cd phpdock
  2. Copy the example environment file and customize it: e.g. modify the PHP extensions you want using the PHP_EXTENSIONS variable.

    cp .env.example .env
  3. Create the nginx site in the path: nginx/sites/* e.g you can copy the the example laravel conf and modify to your own if you want to use diferent than the defailt php version can modify fastcgi_pass to the fpm you want e.g php-fpm7.3:9000

  4. Build and start the Docker containers (in the below example, you will have the default PHP FPM version, MariaDB, PHP 7.4, and nginx):

    docker compose -f docker-compose.yml -f docker-compose.extras.yml up -d php-fpm nginx mariadb php-fpm7.4