定制 cdev/environment-local 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cdev/environment-local

Composer 安装命令:

composer require cdev/environment-local

包简介

Local environment plugin for cdev

README 文档

README

The Local environment plugin for cdev

Over the past few months we have had some hiccups with Docker and memory usage etc causing some strange issues. Environments have also been very slow to run lately.

With the last AMPPS update being over a year ago and the latest supported PHP version being 7.1 it's difficult to test certain sites fully as some newer sites are currently using PHP 7.2.

The cdev Local environment plugin aims to help this by using the existing local modules Apache, PHP and MariaDB (a mysql drop in replacement). It aims to improve the workflow however due to the nature of it there are a number of very in depth dependencies required in order to get it to work.

Installing

Ensure that you are using the most recent version of cdev or at the very least >= 1.1.16.

You can install the plugin with the two commands below:

cdev plugin:add-repository pear/config vcs https://github.com/FelixAuer/Config.git

cdev plugin:install cdev/environment-local

The first command allows a dependency for cdev local to be installed and the second allows for the actual plugin to be installed.

Dependencies

The plugin ships with an install.sh script that should get you up and running with the above. You can run it with the following command:

cdev local:setup-dependencies

The following dependencies are required in order to get cdev Local to run properly. The plugin is still in early stages at the moment with a number of features absent but the basics of running your dev environment are available (starting, stopping and nuking, and database imports).

Here is a list of the requirements in order to get cdev Local running:

Configuration

Once the above dependencies have been installed correctly and the plugin has been installed via the Installing section above you can run the cdev configure command inside the directory you are setting up. This should now show a local plugin alongside the docker one. You can follow the steps as normal with a few extra options:

  • You can now select the version of PHP to use as part of this.
  • There is a new subfolder for apache setting which is for websites that have been setup using composer or where the main entrypoint (index.php file) to the application exists inside a subfolder and not directly inside the src folder.

The rest of the process is similar and cdev local will setup a new apache host in the following format [project_name].dev.com.

Troubleshooting

Whilst working on this and doing a database import originally I got a MySQL has gone away error. In order to fix this you can do the following:

  • nano /usr/local/etc/my.cnf
  • Add max_allowed_packet=64M under a [mysqld] header

On AMPPS I had this setting set to 256M but 64 seemed to solve it for my particular environment.

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固