addiesaas/forge
Composer 安装命令:
composer require addiesaas/forge
包简介
AddieSaaS Forge CLI
关键字:
README 文档
README
AddieSaaS CLI tool to create new AddieSaaS Application as automatically as possible.
The tool does the following:
- Creates the core application - using
git clonefollowed bycomposer install. - Registers external composer repositories (optional).
- Adds containers to the application using
composer require. - Creates and populates
.envfile. - Runs these php artisn commands
key:generateconfig:cacheroute:cachemigratepassport:installstorage:linkdb:seednpm install && npm run prod
USAGE:
addiesaas-forge <OPTIONS> <COMMAND> ...
COMMANDS:
This tool accepts a command as first parameter as outlined below:
create
Create addiesaas.json for new application
install
Install application
STEPS
1. Create
- Open a blank directory.
Run this command.
addiesaas-forge create- A new file named
addiesaas.jsonwill be created. Edit this file in a text editor.- Add/Update/Delete containers (will be discussed later)
- Change options (will be discussed later)
Run this command
addiesaas-install
addiesaas.json
A freshly created addiesaas.json using create command looks like this.
{
"team": "addiesaas",
"vcs": "git@bitbucket.org",
"_app": {
"repo": "git@bitbucket.org:addiesaas/application-core.git",
"branch": "master",
"tag": ""
},
"app": "git@bitbucket.org:addiesaas/application-core.git",
"_repositories": {
"name": "url",
"name2": {
"type": "vcs"
"url": "url"
},
},
"repositories": {
},
"containers": {
"container-admin-backpack": "dev-master",
"container-main": "dev-master",
"container-utils-asset-proxy": "dev-master",
"container-dev-swagger-ui": "dev-master",
"container-pay-biller": "dev-master",
"container-pay-biller-authorizenet": "dev-master",
"container-shop-products": "dev-master",
"container-shop-orders": "dev-master",
"container-builders-embeddedforms": "dev-master",
"container-builders-grapesjs": "dev-master",
"container-builders-surveryjs": "dev-master",
"container-marketing-coupons": "dev-master",
"container-marketing-gift-cards": "dev-master",
"container-marketing-promotion": "dev-master",
"container-marketing-segments": "dev-master",
"container-social-channel": "dev-master"
},
"options": {
"no-pre-install": false,
"keygen": true,
"passport": true,
"config-cache": true,
"route-cache": true,
"storage-link": true,
"migrate": true,
"seed": true,
"npm": true,
"env-create": true,
"env": {
"LOG_CHANNEL": "daily",
"DB_CONNECTION": "mysql",
"DB_HOST": "localhost",
"DB_PORT": 3306,
"DB_DATABASE": "rocketeffect",
"DB_USERNAME": "root",
"DB_PASSWORD": "root",
"MAIL_ENABLED": "false",
"MAIL_DRIVER": "log",
"APP_NAME": "Rocket Effect",
"APP_SHORT_NAME": "RE",
"APP_NAME_SUBTITLE": "Rocket Effect Admin",
"APP_URL": "http://rocketeffect.local",
"MAIL_FROM_ADDRESS": "test@test.test",
"MAIL_FROM_NAME": "Rocket Effect",
"MAIL_TO_SUPPORT_ADDRESS": "test@test.com",
"MAIL_TO_SUPPORT_NAME": "Rocket Effect Support"
}
}
}
Properties of addiesaas.json
All properties prefixed with
_are examples.
team
Team can be any name. You can keep it as it is.
vcs (deprecated)
Main source of the repositories. You can also keep it as it is.
This property is deprecated.
app
The core application repository - git@bitbucket.org:addiesaas/application-core.git
The value can be:
- A string which is the URL of the core application repository. By default, the
masterbranch of the repository will be checked out. - An object with the following properties
repo: The URL of the core application repository, e.g.,"git@bitbucket.org:addiesaas/application-core.git"branch: Name of the branch e.g.,"develop"tag: Name of a tag/version e.g., "v1.5.1"
repositories (optional)
Registers composer packages from external sources.
The value is an object (key-value pairs) where:
- the
key(property name) is a unique name of the package. - The
value(value for each property) can be:- a string representing the URL of the package, usually a git repository URL.
- OR, an object with two properties:
type: Usually the value will be"vcs".url: The URL of the package, usually a git repository URL.
When the
valueis a string, thetypeis assumed asvcs.
Example:
"repositories": {
"modified-ffmpeg": "https://github.com/modifier/laravel-ffmpeg-php72",
"another-example": {
"type": "vcs",
"url": "https://github.com/auther/package"
}
},
containers
Adds addiesaas container to the application.
The value is an object (key-value pairs) where:
the
keyrepresents the name of the container. e.g., "container-shop-products"
Container name have a specific format.- It always starts with
"container-", - followed by section name, e.g.,
"shop"and then a-(dash) followed by the name of the container, e.g.,
"products"Exception: The name
"conatiner-main"does not have a section name.
- It always starts with
the value represents the version/tag e.g.,
"dev-master""dev-develop""1.2.1"
options
Additional options that controls the installation of the application.
no-pre-install (default: false)
If set to true, it asks the Tool not to install the core application.
The Tool will assume that the core application is already installed.
The name sounds weird and confusing. We may change it later.
env-create (default: true)
Asks the Tool to create .env file. If set to false, the Tool will assume that an .env file exists.
When the Tool creates a new
.envfile, it copies from.env.examplefile.
keygen (default: true)
If set to true, it asks the tool to generate application key in .env file.
Runs the following command:
php artisan key:generate
passport (default: true)
If set to true, it asks the tool to install Passport keys.
Runs the following command:
php artisan passport:install
config-cache (default: true)
If set to true, it asks the tool to re-cache config.
Runs the following command:
php artisan config:cache
route-cache (default: true)
If set to true, it asks the tool to re-cache routes.
Runs the following command:
php artisan route:cache
storage-link (default: true)
If set to true, it asks the tool to link storage to public.
Runs the following command:
php artisan storage:link
migrate (default: true)
If set to true, it asks the tool to run data migration..
Runs the following command:
php artisan migrate
seed (default: true)
If set to true, it asks the tool to seed data to database.
Runs the following command:
php artisan db:seed
npm (default: true)
If set to true, it asks the tool to install npm packages and build assets.
Runs the following command:
npm install && npm run prod
env
The value accepts an object. The object represents env variables.
The key (property name) represents the name of the env variable.
The value represents the value of the env variable.
Example:
{
"DB_HOST": "localhost",
"DB_PORT": 3306,
"DB_DATABASE": "rocketeffect",
"DB_USERNAME": "root",
"DB_PASSWORD": "root",
}
addiesaas/forge 适用场景与选型建议
addiesaas/forge 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 129 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「project」 「saas」 「forge」 「addiesaas」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 addiesaas/forge 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 addiesaas/forge 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 addiesaas/forge 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Plans is a package for SaaS apps that need management over plans, features, subscriptions, events for plans or limited, countable features.
Asaas.com PHP API v3 Wrapper
Task system for APPUI
Adaptaçao Asaas.com PHP API Wrapper para PHP 5.6
An introduction to machine learning in Rubix ML using the famous Iris dataset and the K Nearest Neighbors classifier.
Slim starter / Slim skeleton package to boost your development with Slim framework
统计信息
- 总下载量: 129
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-25