定制 mglaman/platform-docker 二次开发

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

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

mglaman/platform-docker

最新稳定版本:v1.0.12

Composer 安装命令:

composer require mglaman/platform-docker

包简介

An opinionated platform stack for Drupal with Docker Compose

README 文档

README

Platform Docker is a CLI tool for scaffolding docker-compose configuration for PHP projects, currently opinionated at PHP projects. Running platform-docker in a directory will create a multi-container application environment for local development.

Currently support is focused at Drupal 7 and Drupal 8. However there is rudimentary WordPress support. Generic PHP applications should be easy to implement.

Requirements

Installation

First, if you do not have Docker then head over to their documentation and see how to install for your machine. For OSX and Windows users, make sure you have Virtual Box installed and docker-machine configured, follow these instructions for the later and ensure you have ran docker-machine create --driver virtualbox default.

composer global require mglaman/platform-docker

Usage

Use within any directory. Until the app itself can scaffold a folder, it's expecting a folder structure of

  • /shared (if not present it will be made)
  • /www (required, this is your build)
  • /repository (not required, but opinionated this is the source of what was built.)
  • /tests (default directory it will look for Behat tests, however checks shared and www)

If you are on Mac OS X, export PLATFORM_DOCKER_MACHINE_NAME with your Docker machine name. The tool will automatically boot the machine or export its environment information as needed. For example, put 12 export PLATFORM_DOCKER_MACHINE_NAME="vmname" in your .bash_profile.

Features

Redis

There is a redis container available. Currently it can be added by adding the following to .platform-project in the root directory of the project

services:
  - redis

Solr

An Apache Solr container is available with the default server URI is http://solr:8983/solr Currently it can be added by adding the following to .platform-project in the root directory of the project

services:
  - solr

Flamegraphs

There is a helper command which patches Drupal to log xhprof items, and then turn them into a flamegraph.

Behat tests

Searches for behat.yml files, laucnches a Selenium (Firefox) container and executes tests.

Commands

Available commands:
  drush                              Runs a Drush command for environment.
  help                               Displays help for a command
  init                               Setup Platform and Docker Compose files
  link                               Displays link to local environment, with port.
  list                               Lists commands
 docker
  docker:logs                        Tails the logs of a specific service container
  docker:proxy (proxy)               Starts the nginx proxy container
  docker:rebuild                     Rebuild configurations and containers
  docker:restart (reboot)            Restarts the docker containers
  docker:ssh                         Allows for quick SSH into a service container.
  docker:stop (stop)                 Stops the docker containers
  docker:up (start)                  Starts the docker containers
 flamegraph
  flamegraph:create                  Creates a flamegraph from xhprof folder contents.
  flamegraph:setup                   Sets the project up for generating flamegrapghs.
  flamegraph:unpatch                 Unpatches index.php to stop xhprof logging.
 project
  project:behat (behat)              Runs behat test suite for project. Checks ./tests, ./www, ./shared and ./repository by default.
  project:db-sync                    Syncs database from environment to local
 provider
  provider:platformsh (platformsh)   Sets up a Platform.sh project

mglaman/platform-docker 适用场景与选型建议

mglaman/platform-docker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 147 次下载、GitHub Stars 达 49, 最近一次更新时间为 2015 年 08 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 mglaman/platform-docker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mglaman/platform-docker 我们能提供哪些服务?
定制开发 / 二次开发

基于 mglaman/platform-docker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 49
  • Watchers: 9
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-08-28