kfiros/this-is-not-xampp
最新稳定版本:3.0
Composer 安装命令:
composer create-project kfiros/this-is-not-xampp
包简介
A template to set up a local PHP development environment using Docker
README 文档
README
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
- Run
docker compose upif you have docker 3.6 or newer, ordocker-compose upif you have an older version. - Open your browser and navigate to
http://localhostto see the magic (andhttp://localhost:8081for phpMyAdmin).
MySQL gotchas
- The MySQL data is stored in the
mysql-datadirectory. 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.internaland not127.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.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-26