VictorMLN / docker-php-nginx-psql-testing
一个项目模板,包含PHP 8.1 + nginx + postgres + 测试环境
8.1
2022-06-18 22:21 UTC
Requires
- php: ^8.1
Requires (Dev)
- phpunit/phpunit: ^9.5
README
简介
模板仓库,提供PHP + nginx + PostgreSQL + 测试环境,可通过本地URL访问:http://web-server.test
模板中包含的内容
- PHP-fpm
- 已准备好的php.ini,可由您自行编辑
- Composer
- Makefile
- Xdebug
- PostgreSQL
- PHPUnit
- Infection
- Nginx
安装
- 通过Composer
$ composer create-project victormln/docker-php-nginx-psql-testing your-project
或使用git
$ git clone https://github.com/victormln/docker-php-nginx-psql-testing.git your-project $ cd your-project $ make install # It will ask you for your sudo password in order to add to your /etc/hosts the domain
- 启动web服务器
$ make start
测试网站: https://web-server.test
(您将看到所有的phpinfo()
信息)
现在您可以在public/index.php
文件中编辑,并开始编码!