承接 gzero/platform 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

gzero/platform

Composer 安装命令:

composer create-project gzero/platform

包简介

GZERO CMS Platform.

README 文档

README

GZERO CMS PLATFORM it's a base to build custom application on GZERO CMS

The project uses Docker containers to package entire application with all of its dependencies into a standardized unit.

The project uses Ansible automation engine to deploy entire application.

Installation

Use composer to create new project:

composer create-project --prefer-dist gzero/platform platform
Directories permissions

Set permissions to storage & bootstrap cache:

chmod 777 -R storage/
chmod 777 -R bootstrap/cache/
chmod 777 -R uploads/
chmod 777 -R public/

[optional]

If you have www-data group in your system you can consider adding you to it. This will allow you to write to files created by php due to umask 002 set in dev mode.

sudo usermod -a -G www-data user

Generate application key
./develop artisan key:genarate
Environment Configuration.

Environment configuration is stored in .env file (copied from .env.example during create-project stage).

Setting the local domains

For proper communication with the API is required to modify the hosts file in your OS. In Ubuntu hosts file should looks like the following:

# /etc/hosts
127.0.0.1 localhost
...
127.0.0.1 dev.gzero.pl
127.0.0.1 api.dev.gzero.pl
...
Install and run Docker Engine:

Docker Engine is supported on Linux, Cloud, Windows, and OS X. Installation instructions are available on Docker documentation page

Build Docker container for platform

After Installing Docker Engine you need to start docker containers, go to project directory and run:

  • Start Docker containers
./develop up -d

This will run all application containers (give some time to ssl certs to generate)

Starting platform_db_1
Starting platform_redis_1
Starting platform_db_tests_1
Starting platform_web_1
  • Create database schema and required data
./develop artisan migrate
  • You can also seed database with example data using this command
./develop artisan db:seed --class='Gzero\\Cms\\CMSSeeder'
  • You may want to publish vendor assets as well
./develop artisan vendor:publish --tag=public --force
  • Done

Stopping Docker

If you want to stop docker containers just run:

./develop stop

This will stop all running application containers

Stopping platform_web_1 ... done
Stopping platform_db_tests_1 ... done
Stopping platform_redis_1 ... done
Stopping platform_db_1 ... done

To remove stopped containers run:

./develop rm

Viewing docker logs

If you want to view logs from docker you can run:

./develop logs web

Updating Docker container for platform

To check for changes in Docker containers for platform u can occasionally run

./develop pull

Testing

To run tests use:

./develop test
./develop test-debug # it runs xdebug
./develop test-frontend # it runs frontend tests using AVA framework
./develop test-acceptance # it runs acceptance tests using local Google Chrome
./develop test-profile # it runs xdebug profiler and saves output in storage dir

Working on frontend

Install required npm modules:

./develop npm install

To run webpack:

./develop npm run dev

or

./develop npm run watch

Testing on frontend

To run only ava tests:

./develop npm test

or

./develop npm run test:watch

To run only eslint:

./develop npm lint

or

./develop npm run lint:watch

Updating composer dependencies

You can run composer directly from docker:

./develop composer update

Continuous Integration

We're providing some boilerplate configs for travis & gitlab-ci so that you can modify them to match your requirements.

Deployment

We're using Ansible as automation tool. We include some example playbooks.

Some example usages:

ansible-playbook -i staging provision.yml 
ansible-playbook -i staging deploy-stack.yml \
 -e "APP_ENV='$(cat example.env)'"
 -e DOMAIN=docker-test.example.com \
 -e LETSENCRYPT_EMAIL=office@example.com \
 -e DB_NAME=gzero_cms \
 -e DB_USER=gzero_cms \
 -e DB_PASSWORD=test \
 -e GITLAB_REPO=example/project
ansible-playbook -i staging deploy-app.yml \
 -e TAG=0.0.5 \
 -e GITLAB_REPO=example/project \
 -e "APP_ENV='$(cat example.env)'"

gzero/platform 适用场景与选型建议

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

它主要适用于以下技术方向: 「framework」 「cms」 「laravel」 「docker」 「ansible」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 11
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-23