ytake/gardening
Composer 安装命令:
composer require ytake/gardening
包简介
Vagrant(centos7) for web developers.
README 文档
README
pre-packaged Vagrant box that provides you a wonderful development environment
without requiring you to install PHP(7.0 ~ 7.2), a web server(Nginx or Apache),
and any other server software on your local machine.
php7 box:
{
"require-dev": {
"ytake/gardening": "~1.0"
}
}
(supported for virtualbox only)
boxes
https://atlas.hashicorp.com/ytake
Included Software
- CentOS 7
- Git
- PHP 7.x (remi repository)
- Apache (2.4.6)
- Nginx (1.14)
- MySQL (5.7)
- Sqlite3
- PostgreSQL (10.1)
- Composer (1.5)
- Node.js (Gulp, webpack)
- Redis(4.0)
- Memcached
- Elasticsearch(6.1)
- Kibana(6.1)
- MongoDB
- Java(1.8)
- fluentd
- Couchbase(5.1)
- beanstalkd(1.10)
- RabbitMQ(3.7.2)
- Apache Cassandra(3.11)
- Apache Spark(2.2.1)
- Apache Kafka(1.0.0 / Confluent Platform)
included php extensions
[PHP Modules]
amqp
apc
apcu
ast
bcmath
bz2
calendar
cassandra
Core
couchbase
ctype
curl
date
dom
ds
event
exif
fileinfo
filter
ftp
gd
geoip
gettext
gmp
grpc
hash
iconv
igbinary
imagick
intl
json
ldap
libsodium
libxml
mbstring
mcrypt
memcached
memprof
mongodb
msgpack
mysqli
mysqlnd
openssl
pcntl
pcre
pcs
PDO
pdo_dblib
pdo_mysql
pdo_pgsql
pdo_sqlite
pdo_sqlsrv
pgsql
phalcon
Phar
phpiredis
posix
protobuf
rdkafka
readline
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
solr
SPL
sqlite3
sqlsrv
ssh2
standard
Stomp
swoole
sysvmsg
sysvsem
sysvshm
tokenizer
uopz
uuid
wddx
xdebug
xhprof
xml
xmlreader
xmlrpc
xmlwriter
xsl
yaml
Zend OPcache
zip
zlib
zmq
[Zend Modules]
Xdebug
Zend OPcache
Composer global
included:
- friendsofphp/php-cs-fixer
- squizlabs/php_codesniffer
- phpmd/phpmd
MySQL and PostgreSQL, RabbitMQ
- user: gardening
- password: 00:secreT,@
Xdebug
default:
xdebug.remote_enable = 1
xdebug.remote_connect_back = 1
xdebug.max_nesting_level = 512
xdebug.idekey = PHPSTORM
php7.0
xdebug.remote_port = 9070
php7.1
xdebug.remote_port = 9071
php7.2
xdebug.remote_port = 9072
Install Gardening Box
case 1, your "home" directory
$ cd ~ $ git clone https://github.com/ytake/gardening.git gardening
setup.sh(Windows .bat) command from the gardening directory to create the vagrant.yaml configuration file.(~/.gardening hidden directory)
$ bash setup.sh
case2, Per Project Installation
To install gardening directly into your project, require it using Composer:
$ composer require ytake/gardening --dev
use the make command to generate the Vagrantfile and gardening.yaml(or gardening.json) file in your project root.
$ ./vendor/bin/gardening gardening:setup
gardening.json:
$ ./vendor/bin/gardening gardening:setup --filetype=json
Configuration
Choose Web Server
default Nginx
web_server: nginx
Apache can be selected if necessary
web_server: httpd
Choose PHP version
default PHP7.2
php-alternatives: "7.1"
(7.0 or 7.1 or 7.2)
Configuring Shared Folders
folders: - map: /path/to/yourProject to: /home/vagrant/yourProjectName
many shared folders:
folders: - map: /path/to/yourProject to: /home/vagrant/yourProjectName - map: /path/to/yourSecondfProject to: /home/vagrant/yourSecondProjectName
Configuring Sites
sites: - map: gardening.app.vagrant to: /home/vagrant/yourProject/public
many sites:
sites: - map: gardening.app.vagrant to: /home/vagrant/yourProject/public - map: gardening.second.app to: /home/vagrant/yourSecondProject/public
use symfony by setting the type option:
sites: - map: gardening.app.vagrant to: /home/vagrant/yourProject/public type: symfony
symfony: symfony2, 3 / symfony4: symfony4
Multiple PHP Versions
sites: - map: gardening.app.vagrant to: /home/vagrant/yourProject/public php: "7.1" - map: gardening.second.app to: /home/vagrant/yourSecondProject/public php: "7.2"
Optional
Fluentd
use Fluentd by setting the fluentd option to true:
fluentd: true
MongoDB
use MongoDB by setting the mongodb option to true:
mongodb: true
Elasticsearch
use Elasticsearch by setting the elasticsearch option to true:
elasticsearch: true
Kibana
use Kibana by setting the kibana option to true:
kibana: true
Access to Kibana http://vagrantIpAddress:5601/app/kibana
Couchbase
use Couchbase by setting the couchbase option to true:
couchbase: true
Access to admin console http://vagrantIpAddress:8091
Apache Cassandra
use Apache Cassandra by setting the cassandra option to true:
cassandra: true
RabbitMQ
use Couchbase by setting the rabbitmq option to true:
rabbitmq: true
Access to rabbitmq management web ui http://vagrantIpAddress:15672
Apache Kafka (Confluent Platform)
use Kafka by setting the confluent option to true:
confluent: true
Ports
By default, the following ports are forwarded to your gardening environment:
- SSH: 2222 → Forwards To 22
- HTTP: 8000 → Forwards To 80
- HTTPS: 44300 → Forwards To 443
- MySQL: 33060 → Forwards To 3306
- Postgres: 54320 → Forwards To 5432
- MongoDB: 47017 → Forwards To 27017
- Elasticsearch: 19200 → Forwards To 9200
- kibana: 56010 → Forwards To 5601
- Cassandra: 19042 → Forwards To 9024
- Kafka: 19092 → Forwards To 9092
Forwarding Additional Ports:
ports: - send: 7777 to: 777
Notice
ytake/gardening 适用场景与选型建议
ytake/gardening 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 11.39k 次下载、GitHub Stars 达 26, 最近一次更新时间为 2016 年 01 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「database」 「elasticsearch」 「vagrant」 「couchbase」 「homestead」 「develop」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ytake/gardening 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ytake/gardening 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ytake/gardening 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Dibi is Database Abstraction Library for PHP
Store your language lines in the database, yaml or other sources
A package for automatically encrypting and decrypting Eloquent attributes in Laravel 5.5+, based on configuration settings.
simple api library.
A PSR-7 compatible library for making CRUD API endpoints
Symfony bundle for Elasticsearch integration with round-robin load balancing
统计信息
- 总下载量: 11.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 26
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-01-11