定制 statonlab/tripaldock 二次开发

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

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

statonlab/tripaldock

Composer 安装命令:

composer require statonlab/tripaldock

包简介

Build a simple development environment for Tripal

README 文档

README

DOI

Tripaldock is a command line tool that helps with creating and running Tripal sites using docker. This tool is designed for developers and is not suitable for production. It utilizes Docker Compose to build a stack of configured containers to host all required services. Supported services:

  • Web Server (Apache2)
  • PHP (7.1)
  • PostgreSQL (9.6)
  • Elasticsearch (5.6)

Installation

It is preferable to install this tool using composer.

composer global require statonlab/tripaldock:~0.1.1

Updating

You can update tripaldock using your local tripaldock!

./tripaldock self-update

Documentation

Required Software

Creating a new tripal site

Using the new command, you can create a fresh Tripal 3 site. The command will automatically download and install the dependencies as well as prepare Drupal and Tripal.

# Create a new site and call it site_name
tripaldock new site_name

# Navigate the new site
cd site_name

Please note that the parameter site_name is also going to be the name of your database.

Admin Credentials

These are the default credentials that tripaldock uses for the admin user:

  • Username: tripal
  • Password: secret

Site Structure

Once tripaldock is done creating your new site, a new directory (site_name) will be created. The directory contains multiple folders along with docker related files. The folders are:

  • modules: Maps to sites/all/modules/custom and should contain your custom modules. By default, this folder will have tripal in it.
  • themes: Maps to sites/all/themes and should contain your custom themes.
  • libraries: Maps to sites/all/libraries and should contain any Drupal libraries.
  • files: Maps to sites/default/files and should hold any custom files.

Local Tripaldock

Once the installation of the new site is completed, a copy of tripaldock will be placed within the resulting file. This is your site's specific tripaldock. It provides a set of commands to interact directly with the container responsible for this site.

Up and Down

To start up the container:

./tripaldock up

To stop the container:

./tripaldock down

SSH

To access your container and run commands directly within it, you may use the ssh command. This command will take you directly to /var/www/html which is where your Drupal resides. From there, you can run any command such as drush and interact with the database using psql -U tripal.

./tripaldock ssh

Which is equivalent to running:

docker-compose exec app bash

Obtaining Logs

You can use the logs command to obtain apache, php, postgres and elasticsearch logs:

./tripaldock logs # Get all available logs
./tripaldock logs app # Get apache and php logs
./tripaldock logs elasticsearch # Get elasticsearch logs
./tripaldock logs postgres # Get DB logs

Installing Drupal Modules

TripalDock provides a special install command to pull known modules directly from git and use composer to install their library dependencies if available. However, if the module is not one of the listed below, it will use drush to attempt to install the module.

./tripaldock install [MODULE NAME]

Known modules:

  • tripal_elasticsearch: installs the module along with elasticsearch-php library

Running Drush

You can also use tripaldock to run drush without having to access the container:

./tripaldock drush [ARGS]

Connecting to Elasticsearch

The tripal_elasticsearch module will require you to setup the correct hostname and port for your elasticsearch server. To use the elasticsearch that ships with this module, you should do the following:

  • Visit /admin/tripal/extension/tripal_elasticsearch/connection
  • Enter http://elasticsearch in the host field. You can omit the port.
  • Click the submit button.

Remove and Destroy

If you would like to completely remove the container from the system including anonymous volumes, run the rm command.

# You will be prompted to confirm the action
./tripaldock rm

Drupal Security

Drupal 7 is periodically updated with important security patches. You should ensure that you keep your core Drupal software up to date and visit the Drupal release website for more information.

Video Tutorials

Setting Up A Website From Scratch With TripalDock

TripalDock Commands And Site Structure

License

Copyright 2017 University of Tennessee Knoxville (GPL)

statonlab/tripaldock 适用场景与选型建议

statonlab/tripaldock 是一款 基于 PLpgSQL 开发的 Composer 扩展包,目前已累计 65 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 statonlab/tripaldock 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • 开发语言: PLpgSQL

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-12-02