kfiros/this-is-not-xampp

A template to set up a local PHP development environment using Docker

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:project

pkg:composer/kfiros/this-is-not-xampp

3.0 2024-11-26 15:03 UTC

This package is auto-updated.

Last update: 2025-11-26 17:10:23 UTC


README

Packagist Version

This is a simple docker-compose setup for local PHP development environment. It includes the following services:

  • PHP - php:8.2-apache
  • MySQL - mysql:8.0
  • phpMyAdmin - phpmyadmin/phpmyadmin
  • xdebug (preconfigured to work with PhpStorm)

Requirements

Environment setup

Run the following commands to setup the project:

composer create-project kfiros/xampp-to-docker [project-name]

Alternatively you can copy the files to a directory or clone the repository.

Usage

  1. Run docker compose up if you have docker 3.6 or newer, or docker-compose up if you have an older version.
  2. Open your browser and navigate to http://localhost to see the magic (and http://localhost:8081 for phpMyAdmin).

MySQL gotchas

  • The MySQL data is stored in the mysql-data directory. If you want to reset the database, you can delete this directory.
  • To access the MySQL database from your code, the host is host.docker.internal and not 127.0.0.1.

I have taken inspiration from jlucky/docker-php-dev-env that does the same thing but with nginx instead of apache. I have also added phpMyAdmin to the setup.